/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory 错误:
Posted mthoutai
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory 错误:相关的知识,希望对你有一定的参考价值。
在安装tomcat时报了错:
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
本机环境:
[[email protected] bin]# uname -a
Linux AY140518225150152f97Z 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] bin]# cat /etc/redhat-release
CentOS release 6.5 (Final)
bing了一下。(google 一直訪问不了。why?)解决方法:
是由于64位系统中安装了32位程序
解决方法:
yum install glibc.i686
于是安装了下: glibc.i686, 发现有出现错误: no package match!
找了n 多方案,都没有解决这个问题, 偶然间注意到:
/usr/local/tomcat/bin/catalina.sh: /usr/local/jdk1.8.0_05/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
于是想是不是jdk版本号不正确? 检查了下jdk:jdk-8u5-linux-i586.tar.gz
果然,jdk 是32位的,上面红色部分看到了好几次没想到是jdk的问题,耽搁了好几天。
下了jdk-8u5-linux-x64.tar.gz,从新安装
tar -zvxf /home/sk/tools/jdk-8u5-linux-x64.tar.gz
再执行:./usr/local/tomcat/bin/configtest.sh
从新安装了64位的JDK之后:
[[email protected] bin]# ./configtest.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk1.8.0_05
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Jun 17, 2014 3:47:55 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Jun 17, 2014 3:47:55 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Jun 17, 2014 3:47:56 PM org.apache.tomcat.util.net.NioselectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 17, 2014 3:47:56 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Jun 17, 2014 3:47:56 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 17, 2014 3:47:56 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1646 ms
--------------------------------------------------------------------------------------------------------------------------------
JDK 32 位是的错误:
[[email protected] bin]# ./configtest.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk1.8.0_05
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
/usr/local/tomcat/bin/catalina.sh: /usr/local/jdk1.8.0_05/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
以上是关于/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory 错误:的主要内容,如果未能解决你的问题,请参考以下文章
解决linux安装软件:/lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录
安装 交叉编译工具连报错 /lib/ld-linux.so.2: bad ELF interpreter
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory 错误:
/lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录
CentOS /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
修复/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory问题