在安装tomcat时报了错:
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
本机环境:
[root@AY140518225150152f97Z 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
[root@AY140518225150152f97Z 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之后:
[root@AY140518225150152f97Z 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 位是的错误:
[root@AY140518225150152f97Z 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