2011
If you’ve ever tried to run a 32 bit application in a 64 bit distro, you’ve probably faced yourself with an error like:
$ ./smokinguns.x86
./smokinguns.x86: error while loading shared libraries: libXxf86dga.so.1: cannot open shared object file: No such file or directory
Which might be odd if you realize you do have that library:
$ whereis libXxf86dga.so.1
libXxf86dga.so: /usr/lib/libXxf86dga.so.1 /usr/lib64/libXxf86dga.so.1
In fact, you have the 64 bit version of that lib, not the 32 bit, which is the one the application need. Distros generally have packages with 32 bit libraries, but those are often broken, missing certain libs. You can check which libs a program require and which you have with the ldd command:
$ ldd smokinguns.x86
linux-gate.so.1 => (0xf7741000)
libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7609000)
libXext.so.6 => /usr/lib32/libXext.so.6 (0xf75fb000)
libXxf86dga.so.1 => not found
libXxf86vm.so.1 => /usr/lib32/libXxf86vm.so.1 (0xf75f5000)
librt.so.1 => /lib32/librt.so.1 (0xf75ec000)
libopenal.so.0 => not found
libdl.so.2 => /lib32/libdl.so.2 (0xf75e8000)
libm.so.6 => /lib32/libm.so.6 (0xf75c1000)
libc.so.6 => /lib32/libc.so.6 (0xf747a000)
libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf7461000)
libXau.so.6 => /usr/lib32/libXau.so.6 (0xf745e000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7445000)
/lib/ld-linux.so.2 (0xf7742000)
libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf743f000)
In my case, I need libXxf86dga.so.1 and libopenal.so.0. They can be downloaded from the distro’s Web package search. That would be http://packages.debian.org for Debian and http://packages.ubuntu.com for Ubuntu, for example. Search by the lib name (or part of it) using the option that searches the contents of packages for 32 bit architecture:
If the name is different, like libopenal.so.0 and libopenal.so.1, you can rename it after downloaded. When you get all the libraries needed, extract their contents. In Debian or Debian-based:
$ dpkg -x libopenal1_1.4.272-2_i386.deb .
$ dpkg -x libxxf86dga1_1.0.2-1_i386.deb .
Finally, as root, copy necessary files to /usr/lib32/:
# mv libopenal.so.0 /usr/lib32/
# mv libXxf86dga.so.1 /usr/lib32/
If everything went fine, you will have all libraries needed:
$ ldd smokinguns.x86
linux-gate.so.1 => (0xf7793000)
libX11.so.6 => /usr/lib32/libX11.so.6 (0xf765b000)
libXext.so.6 => /usr/lib32/libXext.so.6 (0xf764d000)
libXxf86dga.so.1 => /usr/lib32/libXxf86dga.so.1 (0xf7647000)
libXxf86vm.so.1 => /usr/lib32/libXxf86vm.so.1 (0xf7642000)
librt.so.1 => /lib32/librt.so.1 (0xf7639000)
libopenal.so.0 => /usr/lib32/libopenal.so.0 (0xf72f8000)
libdl.so.2 => /lib32/libdl.so.2 (0xf72f4000)
libm.so.6 => /lib32/libm.so.6 (0xf72cd000)
libc.so.6 => /lib32/libc.so.6 (0xf7186000)
libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf716d000)
libXau.so.6 => /usr/lib32/libXau.so.6 (0xf716a000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7151000)
/lib/ld-linux.so.2 (0xf7794000)
libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf714c000)

Nenhum comentário.
Faça seu comentário