CentOS 64位坏ELF解释器 [英] CentOS 64 bit bad ELF interpreter
问题描述
我刚刚安装了CentOS 6 64位版本,我试图在64位机器上安装32位应用程序,并得到此错误:
/lib/ld-linux.so.2:错误ELF解释器:没有此类文件或目录
新到linux。
您使用的是64位系统,没有32位库
大部分桌面Linux系统在安装(基线)支持32位可执行文件 Fedora / Red Hat系列:
pkcon install glibc.i686
可能是某些桌面Debian / Ubuntu系统?:
pkcon install ia32 -libs
Fedora或更高版本的Red Hat,CentOS:
sudo dnf install glibc.i686
,CentOS:
sudo yum install glibc.i686
甚至更旧的RHEL,CentOS:
sudo yum install glibc.i386
Debian或Ubuntu:
sudo apt-get install ia32-libs
)库。
警告
偶尔,这意味着您的RPM DPkg / DSelect)数据库已损坏,或者您尝试运行的应用程序未通过软件包管理器安装。如果你是Linux的新手,你可能希望尽可能避免使用软件包以外的软件包管理器。
如果你不使用 sudo
键入
su -c每次看到 sudo
时,
<
su -c dnf install glibc.i686
一旦你有了,你可能需要支持libs
任何需要安装 glibc的人。 i686
或 glibc.i386
也可能会运行到其他库依赖项。要识别提供任意库的包,您可以使用
ldd / usr / bin / YOURAPPHERE
如果您不确定它是否在 / usr / bin
回来
ldd $(其中YOURAPPNAME)
查看缺少库的输出,并为每个库命名(例如 libSM.so.6 =>缺少
您将使用 libSM.so.6
)并运行:
Fedora / Red Hat Enterprise / CentOS :
dnf提供/usr/lib/libSM.so.6
pre>
或在旧版RHEL / CentOS上:
/usr/lib/libSM.so.6
或者,在Debian / Ubuntu上:
首先安装并下载
的数据库apt-file
sudo apt-get install apt-file&& apt-file update
然后使用
搜索
apt-file find libSM.so.6
前缀路径
/ usr / lib
在(通常)很少,由于历史原因,一些库仍然存在于/ lib
下...在典型的64位系统上,32位库位于/ usr / lib
和64位库存放在/ usr / lib64
。
这应该给你一个包名,例如:
libSM-1.2.0-2.fc15.i686:X.Org X11 SM运行库
Repo:fedora
匹配项:
文件名:/ usr / lib /libSM.so.6
然后您可以
pkcon install libSM.i686
(或完全指定版本:sudo dnf install ibSM-1.2.0-2.fc15.i686
)以获取必需的库。 (在GUI中使用pkcon
或适当的sudo dnf / yum / apt-get
)
一些库在它们的名字之前将有一个时期标志符;这可以省略,它是底层RPM库处理版本号的方式的一个假象;例如
2:libpng-1.2.46-1.fc16.i686:操作PNG图像格式文件的函数库
Repo:fedora
匹配项:
文件名:/usr/lib/libpng.so.3
这里,
2:
可以省略;只需pkcon install libpng.i686
或sudo dnf install libpng-1.2.46-1.fc16.i686
。 (它含糊地暗示了:在某些时候,libpng
包的版本号向后滚动,epoch必须递增以确保较新的版本在更新期间被视为更新或类似情况发生了两次。)
更新更清楚地说明和覆盖各种包管理器选项(2016年3月)
I have just installed CentOS 6 64bit version, I'm trying to install a 32-bit application on a 64-bit machine and got this error:
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
I'm new to linux. How do I resolve this?
解决方案You're on a 64-bit system, and don't have 32-bit library support installed.
To install (baseline) support for 32-bit executables
Most desktop Linux systems in the Fedora/Red Hat family:
pkcon install glibc.i686
Possibly some desktop Debian/Ubuntu systems?:
pkcon install ia32-libs
Fedora or newer Red Hat, CentOS:
sudo dnf install glibc.i686
Older RHEL, CentOS:
sudo yum install glibc.i686
Even older RHEL, CentOS:
sudo yum install glibc.i386
Debian or Ubuntu:
sudo apt-get install ia32-libs
should grab you the (first, main) library you need.
Warning
Incidentially, this 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
Once you have that, you'll probably need support libs
Anyone needing to install
glibc.i686
orglibc.i386
will probably run into other library dependencies, as well. To identify a package providing an arbitrary library, you can useldd /usr/bin/YOURAPPHERE
if you're not sure it's in
/usr/bin
you can also fall back onldd $(which YOURAPPNAME)
Look over the output for missing libraries, and for each one, take its name (e.g. for
libSM.so.6 => missing
you would uselibSM.so.6
) and run:Fedora/Red Hat Enterprise/CentOS:
dnf provides /usr/lib/libSM.so.6
or, on older RHEL/CentOS:
yum provides /usr/lib/libSM.so.6
or, on Debian/Ubuntu:
first, install and download the database for
apt-file
sudo apt-get install apt-file && apt-file update
then search with
apt-file find libSM.so.6
Note the prefix path
/usr/lib
in the (usual) case; rarely, some libraries still live under/lib
for historical reasons … On typical 64-bit systems, 32-bit libraries live in/usr/lib
and 64-bit libraries live in/usr/lib64
.(Debian/Ubuntu organise multi-architecture libraries differently.)
This should give you a package name, e.g.:
libSM-1.2.0-2.fc15.i686 : X.Org X11 SM runtime library Repo : fedora Matched from: Filename : /usr/lib/libSM.so.6
You can then
pkcon install libSM.i686
(or specify the version fully:sudo dnf install ibSM-1.2.0-2.fc15.i686
) to grab the requisite library. (Usingpkcon
in a GUI, orsudo dnf/yum/apt-get
as appropriate…)Some libraries will have an "epoch" designator before their name; this can be omitted, it's an artefact 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; justpkcon install libpng.i686
orsudo dnf install libpng-1.2.46-1.fc16.i686
. (It vaguely implies something like: at some point, the version number of thelibpng
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)
这篇关于CentOS 64位坏ELF解释器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!