Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running a CentOS 6 server with VirtualBox 4.2 Headless. Lately my virtualbox installation hasn't been running correctly.
The problem is that, whenever I try to do something I get this error:

[user@server ~]$ VBoxManage list vms
/usr/lib/virtualbox/VBoxManage: error while loading shared libraries:
: cannot open shared object file: No such file or directory

I believe this is happening because one of my virtual machines were not working. So, after following a forum, I added symlinks to the /usr/lib/virtualbox/components directory. After that didn't fix the problem, I followed another guide that did offer me a solution. But, when I tried to remove the links, I accidentally removed them from /usr/lib/virtualbox/ directory.
After trying to re-add them from the components directory, I get an error saying that it already exists. But, I don't know where to add the symlinks in the /usr/lib/virtualbox/ directory. I have run

rpm -V VirtualBox-4.2  

And it has yielded that I am, as I suspected, missing the dependencies that I accidentally removed. But, I'm not quite sure how to install all the missing dependencies (as there are quite a few, I would like to install them all at once.) and restore VirtualBox to its original state. Can anyone offer some advice?
I have tried just a yum install of VirtualBox 4.2, but to no avail.


share|improve this question
After reading deeper into the man page for rpm, there appears to be a reinstall switch, I'm going to try that. – Chris Powell Jan 24 '13 at 16:14
Never rm when you can mv. One can be easily undone, the other, not so much. :) I can't even guess at what you did, to help you undo it. Best chance at this point is to hope you can sort it out with yum reinstall. – Aaron Copley Jan 24 '13 at 16:31
I fixed it! What I ended up doing was rpm -e VirtualBox-4.2 Then I reinstalled VirtualBox, and now all is fine and dandy! – Chris Powell Jan 24 '13 at 17:53
Did you find that yum reinstall wasn't as effective as rpm -e; rpm -i? – Aaron Copley Jan 24 '13 at 20:02
yum update failed every time I tried to use it. – Chris Powell Jan 29 '13 at 21:53

This command shouldn't be showing you missing dependencies. It's showing you files from the VirtualBox box package that do not match their RPM (and why.)

Before you reinstall the RPM, these files will need to be deleted, or preferably renamed, since the install probably will not over write configuration. Afterwards, you can use yum reinstall VirtualBox-4.2.

share|improve this answer
I see. Ok, I will try doing that then. – Chris Powell Jan 24 '13 at 16:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.