Linux 下软件安装时报/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux 下软件安装时报/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory相关的知识,希望对你有一定的参考价值。
十一国庆放假回来,一同事遇到一个问题就是在redhat 6下安装软件的时候会报 /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory错误。
经过查询是需要安装glibc-2.12-1.149.el6.i686.rpm 一个32bit的包,这里就是一个运维常见的程序坑,他的项目组软件在软件初始化的时候,是使用的32bit的包。但是在redhat 下默认安装时64bit的包。而且通过yum安装就会提示你已经安装最新的版本了。所以需要手动在进行安装32bit的包
[[email protected] Packages]# rpm -ivh glibc-2.12-1.149.el6.i686.rpm
warning: glibc-2.12-1.149.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
libfreebl3.so is needed by glibc-2.12-1.149.el6.i686
libfreebl3.so(NSSRAWHASH_3.12.3) is needed by glibc-2.12-1.149.el6.i686
这里会报缺少一个依赖包nss-softokn-freebl-3.14.3-17.el6.i686.rpm
[[email protected] Packages]# rpm -ivh nss-softokn-freebl-3.14.3-17.el6.i686.rpm
warning: nss-softokn-freebl-3.14.3-17.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
libc.so.6 is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libc.so.6(GLIBC_2.0) is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libc.so.6(GLIBC_2.1) is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libc.so.6(GLIBC_2.1.3) is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libc.so.6(GLIBC_2.3) is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libc.so.6(GLIBC_2.3.4) is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libc.so.6(GLIBC_2.4) is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libc.so.6(GLIBC_2.7) is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libdl.so.2 is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libdl.so.2(GLIBC_2.0) is needed by nss-softokn-freebl-3.14.3-17.el6.i686
libdl.so.2(GLIBC_2.1) is needed by nss-softokn-freebl-3.14.3-17.el6.i686
如上所示,使用RPM安装缺少依赖。可以将两个包放在一起安装解决这个问题。当然最好是用yum安装。
[[email protected] Packages]# rpm -ivh glibc-2.12-1.149.el6.i686.rpm nss-softokn-freebl-3.14.3-17.el6.i686.rpm
warning: glibc-2.12-1.149.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:nss-softokn-freebl ########################################### [ 50%]
2:glibc ########################################### [100%]
如果还不行就强制进行安装
[[email protected] Packages]# rpm -ivh glibc-2.12-1.1 49.el6.i686.rpm --nodeps --force
本文出自 “老白的博客” 博客,请务必保留此出处http://laobaiv1.blog.51cto.com/2893832/1973366
以上是关于Linux 下软件安装时报/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory的主要内容,如果未能解决你的问题,请参考以下文章
Python--linux下安装依赖时报错command 'gcc' failed with exit status 1
Python--linux下安装依赖时报错command 'gcc' failed with exit status 1