Erro ao carregar bibliotecas compartilhadas: libdl.so.2 (e outros), nenhum tal arquivo. Bibliotecas existem

1

Tentativa de instalar um aplicativo Java a partir de um arquivo .bin. Ao abrir o instalador a partir da linha de comando, vejo esses erros:

[boxen]# ./ZendStudio-5_2_0.bin 
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
hostname: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory

Launching installer...

grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/tmp/install.dir.7515/Linux/resource/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

...

O problema é que todos esses objetos existem no sistema.

# locate libdl.so.2
/usr/lib/libdl.so.2
/usr/lib64/libdl.so.2

# locate libc.so.6
/usr/lib/libc.so.6
/usr/lib/i686/nosegneg/libc.so.6
/usr/lib64/libc.so.6

# locate libnsl.so.1
/usr/lib/libnsl.so.1
/usr/lib64/libnsl.so.1

Se eu emitir isso,

echo $LD_LIBRARY_PATH

Eu não recebo nada.

Então, adiciono diretórios de inclusão ao caminho:

[boxen]# LD_LIBRARY_PATH=/usr/lib:/usr/lib64/:/usr/local/lib/:/usr/local/lib64/
[boxen]# echo $LD_LIBRARY_PATH
/usr/lib:/usr/lib64/:/usr/local/lib/:/usr/local/lib64/

E volte a executar o instalador ...

[boxen]# ./ZendStudio-5_2_0.bin 
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
hostname: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory

Launching installer...

grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/tmp/install.dir.8055/Linux/resource/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

...

Exatamente o mesmo lote de erros.

Versão do Java instalada:

java version "1.7.0_65"
OpenJDK Runtime Environment (rhel-2.5.1.2.el7_0-x86_64 u65-b17)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Instância simplificada:

# rpm -qa | grep glibc
glibc-2.17-55.el7.i686
glibc-2.17-55.el7.x86_64
glibc-headers-2.17-55.el7.x86_64
glibc-common-2.17-55.el7.x86_64
glibc-devel-2.17-55.el7.x86_64

O que pode estar causando o instalador a não ver arquivos que estão claramente lá e na variável de ambiente?

    
por a coder 29.08.2014 / 21:03

1 resposta

2

Sinto-me com sorte ao encontrar essa solução, mas queria postá-la no caso de alguém se deparar com esse problema ao instalar o software legado.

Assuming the install anywhere script is called Install.bin

# cp Install.bin Install.bak
# cat Install.bak | sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" > Install.bin
# rm Install.bak

Isso funcionou bem.

A correção foi originalmente publicada no Zend Knowledgebase (agora 404 ' ed), ele ainda é arquivado em linuxquestions.org .

    
por 29.08.2014 / 21:30