공유 라이브러리 로드 오류: libdl.so.2(및 기타), 해당 파일이 없습니다. 도서관이 존재합니다

공유 라이브러리 로드 오류: libdl.so.2(및 기타), 해당 파일이 없습니다. 도서관이 존재합니다

.bin 파일에서 Java 애플리케이션을 설치해 보세요. 명령줄에서 설치 프로그램을 열면 다음 오류가 표시됩니다.

[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

...

문제는 이러한 각 개체가 시스템에 존재한다는 것입니다.

# 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

이걸 발행하면,

echo $LD_LIBRARY_PATH

나는 아무것도 얻지 못했습니다.

그래서 경로에 포함 디렉터리를 추가했습니다.

[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/

설치 프로그램을 다시 실행하십시오 ...

[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

...

정확히 동일한 일괄 오류입니다.

설치된 Java 버전:

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)

glib가 설치되었습니다:

# 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

설치 프로그램이 환경 변수에 분명히 존재하는 파일을 볼 수 없는 원인은 무엇입니까?

답변1

저는 운이 좋게도 이 솔루션을 발견했지만, 레거시 소프트웨어를 설치할 때 다른 사람이 이 문제에 직면할 경우를 대비해 게시하고 싶었습니다.

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

이것은 훌륭하게 작동합니다.

이 수정 사항은 원래 다음 위치에 게시되었습니다.Zend 기술 자료(현재 404'ed), 아직 보관되어 있습니다.linuxquestions.org.

관련 정보