Resolving 32-Bit Dependencies on 64-Bit Ubuntu (or Debian) with getlibs

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.

Installing getlibs

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:
libsdl1.2debian-all
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).

Sources

  • http://ubuntuforums.org/showthread.php?t=474790

Finished reading? Try one of the following:

  • Tell me what you think in the comments!
  • Get the feed, and keep tabs on new content.
  • Write a response on your blog, and post a link in the comments.
Readability - (FRE: 57.9 | FKI: 7.1 | GFI: 10.8)
5 Responses to Resolving 32-Bit Dependencies on 64-Bit Ubuntu (or Debian) with getlibs
  1. [...] is taken from Slack-Tux, Lazy Penguin, and is a HOWTO  by Chris Olstrom, thanks [...]

  2. [...] les dejo dos enlaces, uno con un HowTo de Getlibs y otro con una explicación sobre como correr aplicaciones 32 bits en sistemas Debian 64 [...]

  3. [...] les dejo dos enlaces, uno con un HowTo de Getlibs y otro con una explicación sobre como correr aplicaciones 32 bits en sistemas Debian 64 [...]

  4. [...] les dejo dos enlaces, uno con un HowTo de Getlibs y otro con una explicación sobre como correr aplicaciones 32 bits en sistemas Debian 64 [...]

  5. g0hl1n
    July 15, 2012 | 23:07

    Thanks!
    Works fine, also on Debian Testing.

Leave a Reply

Wanting to leave an <em>phasis on your comment?

Trackback URL http://chris.olstrom.com/howto/resolve-dependencies-with-getlibs/trackback/
More in Guides (5 of 10 articles)