Compatibilidade de Biblioteca Compartilhada (library) na execução de programas de 32 bits em plataforma de 64 bits

Por Fábio Gil - Criado em 14/07/2011

Verifique se o programa a ser executado é de 32 bits:


 * 1) file programa

Para testar e visualizar a situação das bibliotecas compartilhadas os quais um programa irá requer, execute:


 * 1) ldd programa

Se o programa ou sistema proprientário de 32 bits a ser executado for apenas modo texto, instalar:


 * 1) apt-get install ia32-libs

Caso for modo gráfico:


 * 1) apt-get install ia32-libs-gtk

Estudo de Caso

Ao tentar executar um programa, este acusa que tal biblioteca não foi encontrada:

fabiogil@xendesk:~/awkgui/Sed Awk GUI$ ./Sed\ And\ Awk\ GUI\ Editor ./Sed And Awk GUI Editor: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory

Ao verificar as bibliotecas deste, várias delas não foram encontradas:

fabiogil@xendesk:~/awkgui/Sed Awk GUI$ ldd Sed\ And\ Awk\ GUI\ Editor linux-gate.so.1 => (0xffffe000) libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7e57000) libgdk_pixbuf-2.0.so.0 => not found libgtk-x11-2.0.so.0 => not found libgdk-x11-2.0.so.0 => not found libgobject-2.0.so.0 => not found libglib-2.0.so.0 => not found libgthread-2.0.so.0 => not found libgmodule-2.0.so.0 => not found libpango-1.0.so.0 => not found libpthread.so.0 => /lib32/libpthread.so.0 (0xf7e3e000) libatk-1.0.so.0 => not found libdl.so.2 => /lib32/libdl.so.2 (0xf7e3a000) libc.so.6 => /lib32/libc.so.6 (0xf7ce8000) libxcb-xlib.so.0 => /usr/lib32/libxcb-xlib.so.0 (0xf7ce5000) libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf7ccd000) /lib/ld-linux.so.2 (0xf7f5f000) libXau.so.6 => /usr/lib32/libXau.so.6 (0xf7cca000) libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf7cc5000)

Instalando as bibliotecas 'ia32-libs' e 'ia32-libs-gtk' as bibliotecas foram encontradas no sistema operacional:

fabiogil@xendesk:~/awkgui/Sed Awk GUI$ ldd Sed\ And\ Awk\ GUI\ Editor linux-gate.so.1 => (0xffffe000) libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7e15000) libgdk_pixbuf-2.0.so.0 => /usr/lib32/libgdk_pixbuf-2.0.so.0 (0xf7dfd000) libgtk-x11-2.0.so.0 => /usr/lib32/libgtk-x11-2.0.so.0 (0xf7a6f000) libgdk-x11-2.0.so.0 => /usr/lib32/libgdk-x11-2.0.so.0 (0xf79e8000) libgobject-2.0.so.0 => /usr/lib32/libgobject-2.0.so.0 (0xf79ab000) libglib-2.0.so.0 => /usr/lib32/libglib-2.0.so.0 (0xf78f6000) libgthread-2.0.so.0 => /usr/lib32/libgthread-2.0.so.0 (0xf78f1000) libgmodule-2.0.so.0 => /usr/lib32/libgmodule-2.0.so.0 (0xf78ed000) libpango-1.0.so.0 => /usr/lib32/libpango-1.0.so.0 (0xf78ad000) libpthread.so.0 => /lib32/libpthread.so.0 (0xf7896000) libatk-1.0.so.0 => /usr/lib32/libatk-1.0.so.0 (0xf787a000) libdl.so.2 => /lib32/libdl.so.2 (0xf7876000) libc.so.6 => /lib32/libc.so.6 (0xf7724000) libxcb-xlib.so.0 => /usr/lib32/libxcb-xlib.so.0 (0xf7722000) libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf770a000) libm.so.6 => /lib32/libm.so.6 (0xf76e6000) libpangocairo-1.0.so.0 => /usr/lib32/libpangocairo-1.0.so.0 (0xf76db000) libXcomposite.so.1 => /usr/lib32/libXcomposite.so.1 (0xf76d8000) libXdamage.so.1 => /usr/lib32/libXdamage.so.1 (0xf76d5000) libXfixes.so.3 => /usr/lib32/libXfixes.so.3 (0xf76d0000) libcairo.so.2 => /usr/lib32/libcairo.so.2 (0xf7664000) libfontconfig.so.1 => /usr/lib32/libfontconfig.so.1 (0xf7638000) libXext.so.6 => /usr/lib32/libXext.so.6 (0xf762a000) libXrender.so.1 => /usr/lib32/libXrender.so.1 (0xf7621000) libXinerama.so.1 => /usr/lib32/libXinerama.so.1 (0xf761e000) libXi.so.6 => /usr/lib32/libXi.so.6 (0xf7616000) libXrandr.so.2 => /usr/lib32/libXrandr.so.2 (0xf7610000) libXcursor.so.1 => /usr/lib32/libXcursor.so.1 (0xf7606000) libpcre.so.3 => /usr/lib32/libpcre.so.3 (0xf75dd000) librt.so.1 => /lib32/librt.so.1 (0xf75d4000) /lib/ld-linux.so.2 (0xf7f1e000) libXau.so.6 => /usr/lib32/libXau.so.6 (0xf75d1000) libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf75cc000) libpangoft2-1.0.so.0 => /usr/lib32/libpangoft2-1.0.so.0 (0xf75a4000) libfreetype.so.6 => /usr/lib32/libfreetype.so.6 (0xf752f000) libz.so.1 => /usr/lib32/libz.so.1 (0xf751a000) libdirectfb-1.0.so.0 => /usr/lib32/libdirectfb-1.0.so.0 (0xf74b3000) libfusion-1.0.so.0 => /usr/lib32/libfusion-1.0.so.0 (0xf74ab000) libdirect-1.0.so.0 => /usr/lib32/libdirect-1.0.so.0 (0xf7496000) libpng12.so.0 => /usr/lib32/libpng12.so.0 (0xf7472000) libxcb-render-util.so.0 => /usr/lib32/libxcb-render-util.so.0 (0xf746e000) libxcb-render.so.0 => /usr/lib32/libxcb-render.so.0 (0xf7467000) libpixman-1.so.0 => /usr/lib32/libpixman-1.so.0 (0xf743e000) libexpat.so.1 => /usr/lib32/libexpat.so.1 (0xf7417000)

... então o programa passou a funcionar normalmente.

Referencias


 * Article: Using proprietary i386 apps on an amd64 system