You are not logged in.
The concept of "shared libraries" is like a intelligence test for me: I have the feeling that I fail over and over again...
This afternoon I upgraded my system: it had been a while so many updates poored in. Afterwards I notices that VirtalBox would not start. That happenes ofter and mostly the kernel-module is causing it. My own fault because I do not run the "arch-virtualbox". This time the error message was different:
/opt/VirtualBox-2.1.0/VirtualBox: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory
My first pavlov reaction was
$ yaourt -Sy libcap
Password:
:: Synchronizing package databases...
testing is up to date
core is up to date
extra is up to date
community is up to date
error: failed to update unstable (unexpected error)
kdemod-legacy is up to date
warning: libcap-2.16-2 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Targets (1): libcap-2.16-2
Total Download Size: 0.00 MB
Total Installed Size: 0.20 MB
Proceed with installation? [Y/n] y
checking package integrity...
(1/1) checking for file conflicts [##########################################################################################] 100%
(1/1) upgrading libcap [##########################################################################################] 100%
comm: file 1 is not in sorted order
comm: file 1 is not in sorted order
Strange, did not see that before. Lets try as root with the good-old-pacman. Yep, that just installed.
But, virtualbox still not starting. So I looked for myself and I found in /lib:
libcap.so & libcap.so.2.
Hmm let's try (as root)
ln libcap.so libcap.so.1
That worked! virutal box is working again, but I not have any idea what I did and wheter I did the right thing...
Somewhere between "too small" and "too large" lies the size that is just right.
- Scott Hayes
Offline
Its a bad practice to symlink libraries. You may get problems later which will be hard to troubleshoot. The better way will be to downgrade libcap back to the version in extra.
Offline
Or rebuild virtualbox against the libcap in testing.
Offline
I thought there used to be a sticky about this somewhere, but now I can't find it...
Anyways, this type of error usually indicates that the app not working needs to be recompiled with the new version (the version you're using) of the package that provides the file it's complaining about. So, VirtualBox needs to be recompiled against the new libpcap. Grab the VirtualBox PKGBUILD, etc. from ABS (Wiki has info) and makepkg -s to compile the package yourself. pacman -U to install it. You should remove your symlink, and if it now works, file a bug to let Arch devs know they need to recompile and re-release VirtualBox.
To explain, the problem is that VirtualBox is looking for, as you can see, libcap.so.1. Libraries like that are numbered according to their version - you have a newer versin. _Usually_ that's OK, and rebuilding VirtualBox will cause it to use the new filename from now on, since it determines the filename at the compile stage. Sometimes a symlink/rebuild won't work, since the app won't work with the new lib, and that's for the app devs to fix. Never use a symlink, anyways - as stated by others, it can muck things up.
Hope that helped
Offline