One of the more irritating aspects of running a 64-bit distribution is that there are still many applications that are not compiled as native 64-bit binaries. This leads to dependence on 32-bit libraries, and managing these 32-bit dependencies is often unpleasant. There is no shortage of users who have introduced more problems than they have solved by forcing installation of 32-bit libraries.
Cappy has released a handy script to detect and install libraries and other dependencies for 32-bit applications on 64-bit Ubuntu GNU/Linux. Handy things it can do include fetching missing libraries either by name, and figuring out which ones a given binary needs.
Note: This script makes use of the Debian package management system, and is unlikely to work properly on distributions that are not Debian-based.
Installation couldn’t be simpler. Download getlibs, and double-click the .deb package. If you download getlibs via Firefox, you should get an “Open with gdebi” option or something equivalent. To install via terminal, try:
$ wget http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb
$ sudo dpkg -i getlibs-all.deb
Installing Libraries with getlibs
Usage is pretty straightforward. If you know the name of the library you need, you can feed it to getlibs, and it should fetch it.
$ sudo getlibs -l libogg.so.0 libSDL-1.2.so.0
Matched library libogg.so.0 to libogg0
Matched library libSDL-1.2.so.0 to libsdl1.2debian-all
Reading package lists... Done
Building dependency tree
Reading state information... Done
libogg0 is already the newest version.
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 213kB of archives.
After unpacking 20.5kB of additional disk space will be used.
Do you want to continue [Y/n]?
Alternatively, feed getlibs the path to given binary, and it should figure out what is missing (if anything) and install it. For example, say the binary for Second Life is installed at /opt/32/secondlife/secondlife.bin:
$ sudo getlibs /opt/32/secondlife/secondlife.bin
At which point it should match any libraries that are not already installed and fetch them, assuming they are available (see above for output example).