Programming

CentOS 64 비트 잘못된 ELF 인터프리터

procodes 2020. 5. 20. 22:06
반응형

CentOS 64 비트 잘못된 ELF 인터프리터


CentOS 6 64 비트 버전을 방금 설치했는데 64 비트 컴퓨터에 32 비트 응용 프로그램을 설치하려고하는데이 오류가 발생했습니다.

/lib/ld-linux.so.2 : 잘못된 ELF 인터프리터 : 해당 파일 또는 디렉토리가 없음

저는 리눅스를 처음 사용합니다. 이 문제를 어떻게 해결합니까?


64 비트 시스템에 있으며 32 비트 라이브러리 지원이 설치되어 있지 않습니다.

32 비트 실행 파일에 대한 설치 (기준) 지원

(설정에서 sudo를 사용하지 않으면 아래 참고 사항을 읽으십시오)

Fedora / Red Hat 제품군의 대부분의 데스크탑 Linux 시스템 :

 pkcon install glibc.i686

일부 데스크탑 데비안 / 우분투 시스템?

pkcon install ia32-libs

Fedora 또는 최신 Red Hat, CentOS :

 sudo dnf install glibc.i686

이전 RHEL, CentOS :

   sudo yum install glibc.i686

더 오래된 RHEL, CentOS :

  sudo yum install glibc.i386

데비안 또는 우분투 :

   sudo apt-get install ia32-libs

필요한 (첫 번째, 주요) 라이브러리를 가져와야합니다.

당신이 그것을 가지고 있다면, 아마 당신은 지원 라이브러리가 필요할 것입니다

다른 라이브러리 종속성 을 설치해야 할 수도 glibc.i686있고 glibc.i386아마도 실행할 수도 있습니다. 임의의 라이브러리를 제공하는 패키지를 식별하려면

 ldd /usr/bin/YOURAPPHERE

확실하지 않으면 /usr/bin다시 넘어갈 수 있습니다.

 ldd $(which YOURAPPNAME)

결과는 다음과 같습니다.

    linux-gate.so.1 =>  (0xf7760000)
    libpthread.so.0 => /lib/libpthread.so.0 (0xf773e000)
    libSM.so.6 => not found

누락 된 라이브러리 (예 : libSM.so.6위 출력에서)를 확인하고 각 라이브러리 에 대해 제공하는 패키지를 찾아야합니다.

배포 제품군 당 패키지를 찾는 명령

페도라 / Red Hat Enterprise / CentOS :

 dnf provides /usr/lib/libSM.so.6

또는 이전 RHEL / CentOS에서 :

 yum provides /usr/lib/libSM.so.6

또는 데비안 / 우분투에서 :

먼저 데이터베이스를 설치하고 다운로드하십시오. apt-file

 sudo apt-get install apt-file && apt-file update

다음으로 검색

 apt-file find libSM.so.6

/usr/lib(보통) 경우 접두사 경로 적어 둡니다 . 드물기는하지만 일부 라이브러리는 여전히 /lib역사적인 이유로 남아 있습니다. 일반적인 64 비트 시스템에서 32 비트 라이브러리는 /usr/lib64 비트 라이브러리에 /usr/lib64있습니다.

(데비안 / 우분투는 다중 아키텍처 라이브러리를 다르게 구성합니다.)

누락 된 라이브러리 용 패키지 설치

위는 패키지 이름을 알려줍니다. 예 :

libSM-1.2.0-2.fc15.i686 : X.Org X11 SM runtime library
Repo        : fedora
Matched from:
Filename    : /usr/lib/libSM.so.6

이 예에서 패키지의 이름입니다 libSM패키지의 32 비트 버전의 이름입니다libSM.i686 .

그런 다음 pkconGUI를 사용하여 또는 필요한 경우 패키지를 설치하여 필수 라이브러리를 가져올 수 있습니다 sudo dnf/yum/apt-get. pkcon install libSM.i686. 필요한 경우 버전을 완전히 지정할 수 있습니다. sudo dnf install ibSM-1.2.0-2.fc15.i686.

Some libraries will have an “epoch” designator before their name; this can be omitted (the curious can read the notes below).

Notes

Warning

Incidentially, the issue you are facing either implies that your RPM (resp. DPkg/DSelect) database is corrupted, or that the application you're trying to run wasn't installed through the package manager. If you're new to Linux, you probably want to avoid using software from sources other than your package manager, whenever possible...

If you don't use "sudo" in your set-up

Type

su -c

every time you see sudo, eg,

su -c dnf install glibc.i686

About the epoch designator in library names

The “epoch” designator before the name is an artifact of the way that the underlying RPM libraries handle version numbers; e.g.

2:libpng-1.2.46-1.fc16.i686 : A library of functions for manipulating PNG image format files
Repo        : fedora
Matched from:
Filename    : /usr/lib/libpng.so.3

Here, the 2: can be omitted; just pkcon install libpng.i686 or sudo dnf install libpng-1.2.46-1.fc16.i686. (It vaguely implies something like: at some point, the version number of the libpng package rolled backwards, and the “epoch” had to be incremented to make sure the newer version would be considered “newer” during updates. Or something similar happened. Twice.)


Updated to clarify and cover the various package manager options more fully (March, 2016)


Just came across the same problem on a freshly installed CentOS 6.4 64-bit machine. A single yum command will fix this plus 99% of similar problems:

yum groupinstall "Compatibility libraries"

Either prefix this with 'sudo' or run as root, whichever works best for you.


In general, when you get an error like this, just do

yum provides ld-linux.so.2

then you'll see something like:

glibc-2.20-5.fc21.i686 : The GNU libc libraries
Repo        : fedora
Matched from:
Provides    : ld-linux.so.2

and then you just run the following like BRPocock wrote (in case you were wondering what the logic was...):

yum install glibc.i686

Try

$ yum provides ld-linux.so.2
$ yum update
$ yum install glibc.i686 libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6

Hope this clears out.


Just wanted to add a comment in BRPocock, but I don't have the sufficient privilegies.

So my contribution was for everyone trying to install IBM Integration Toolkit from IBM's Integration Bus bundle.

When you try to run "Installation Manager" command from folder /Integration_Toolkit/IM_Linux (the file to run is "install") you get the error showed in this post.

Further instructions to fix this problem you'll find in this IBM's web page: https://www-304.ibm.com/support/docview.wss?uid=swg21459143

Hope this helps for anybody trying to install that.


sudo yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6


I would add for Debian you need at least one compiler in the system (according to Debian Stretch and Jessie 32-bit libraries ).

I installed apt-get install -y gcc-multilib in order to run 32-bit executable file in my docker container based on debian:jessie.


You can also install OpenJDK 32-bit (.i686) instead. According to my test, it will be installed and works without problems.

sudo yum install java-1.8.0-openjdk.i686

Note:

The java-1.8.0-openjdk package contains just the Java Runtime Environment. If you want to develop Java programs then install the java-1.8.0-openjdk-devel package.

See here for more details.

참고URL : https://stackoverflow.com/questions/8328250/centos-64-bit-bad-elf-interpreter

반응형