eclispe 启动 apache-tomcat-7.0.14 APR 出错解决办法
2011-11-30 17:05
746 查看
错误日志:
The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:
tomcat 官网 关于APR 介绍
找到对应平台安装办法:
Linux
Linux
Most Linux distributions will ship packages for APR and OpenSSL. The JNI wrapper (libtcnative) will then have to be compiled. It depends on APR, OpenSSL, and the Java headers.
Requirements:
APR 1.2+ development headers (libapr1-dev package)
OpenSSL 0.9.7+ development headers (libssl-dev package)
JNI headers from Java compatible JDK 1.4+
GNU development environment (gcc, make)
The wrapper library sources are located in the Tomcat binary bundle, in the
首先按要求 安装 APR OpenSSL 等等
然后 进入
~/web/apache-tomcat-7.0.14/bin$
解压 tomcat-native.tar.gz
再进入 ~/web/apache-tomcat-7.0.14/bin/tomcat-native-1.1.20-src/jni/native$
执行 官网提示的
但一般不会成功,提示需要 添加参数
按提示:
以上配置可以 查看 ~/.bashrc 文件
最终会在lib 目录生成 libtcnative 相关文件
dengpei@dengpei-pc:~/web/apache-tomcat-7.0.14/lib$ ls
annotations-api.jar jsp-api.jar tomcat-api.jar
catalina-ant.jar libtcnative-1.a tomcat-coyote.jar
catalina-ha.jar libtcnative-1.la tomcat-dbcp.jar
catalina.jar libtcnative-1.so tomcat-i18n-es.jar
catalina-tribes.jar libtcnative-1.so.0 tomcat-i18n-fr.jar
ecj-3.6.2.jar libtcnative-1.so.0.1.20 tomcat-i18n-ja.jar
el-api.jar mysql-connector-java-5.1.18-bin.jar tomcat-util.jar
jasper-el.jar pkgconfig
jasper.jar servlet-api.jar
dengpei@dengpei-pc:~/web/apache-tomcat-7.0.14/lib$
ls -l :
-rw-r--r-- 1 dengpei dengpei 1563680 2011-11-30 15:48 libtcnative-1.a
-rwxr-xr-x 1 dengpei dengpei 1071 2011-11-30 15:48 libtcnative-1.la
lrwxrwxrwx 1 dengpei dengpei 23 2011-11-30 15:48 libtcnative-1.so -> libtcnative-1.so.0.1.20
lrwxrwxrwx 1 dengpei dengpei 23 2011-11-30 15:48 libtcnative-1.so.0 -> libtcnative-1.so.0.1.20
-rwxr-xr-x 1 dengpei dengpei 880487 2011-11-30 15:48 libtcnative-1.so.0.1.20
最后将这些文件 拷贝到 /usr/lib/
运行 正常。
The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:
tomcat 官网 关于APR 介绍
找到对应平台安装办法:
Linux
Linux
Most Linux distributions will ship packages for APR and OpenSSL. The JNI wrapper (libtcnative) will then have to be compiled. It depends on APR, OpenSSL, and the Java headers.
Requirements:
APR 1.2+ development headers (libapr1-dev package)
OpenSSL 0.9.7+ development headers (libssl-dev package)
JNI headers from Java compatible JDK 1.4+
GNU development environment (gcc, make)
The wrapper library sources are located in the Tomcat binary bundle, in the
bin/tomcat-native.tar.gzarchive. Once the build environment is installed and the source archive is extracted, the wrapper library can be compiled using (from the folder containing the configure script):
![]() | ![]() | ![]() |
![]() | ./configure && make && make install | ![]() |
然后 进入
~/web/apache-tomcat-7.0.14/bin$
解压 tomcat-native.tar.gz
再进入 ~/web/apache-tomcat-7.0.14/bin/tomcat-native-1.1.20-src/jni/native$
执行 官网提示的
./configure && make && make install
但一般不会成功,提示需要 添加参数
--with-apr
按提示:
--with-apr=/usr/bin/apr-1-config --with-java-home=/usr/lib/jvm/java-6-sun-1.6.0.26 --with-ssl=yes --prefix=/home/dengpei/web/apache-tomcat-7.0.14
以上配置可以 查看 ~/.bashrc 文件
最终会在lib 目录生成 libtcnative 相关文件
dengpei@dengpei-pc:~/web/apache-tomcat-7.0.14/lib$ ls
annotations-api.jar jsp-api.jar tomcat-api.jar
catalina-ant.jar libtcnative-1.a tomcat-coyote.jar
catalina-ha.jar libtcnative-1.la tomcat-dbcp.jar
catalina.jar libtcnative-1.so tomcat-i18n-es.jar
catalina-tribes.jar libtcnative-1.so.0 tomcat-i18n-fr.jar
ecj-3.6.2.jar libtcnative-1.so.0.1.20 tomcat-i18n-ja.jar
el-api.jar mysql-connector-java-5.1.18-bin.jar tomcat-util.jar
jasper-el.jar pkgconfig
jasper.jar servlet-api.jar
dengpei@dengpei-pc:~/web/apache-tomcat-7.0.14/lib$
ls -l :
-rw-r--r-- 1 dengpei dengpei 1563680 2011-11-30 15:48 libtcnative-1.a
-rwxr-xr-x 1 dengpei dengpei 1071 2011-11-30 15:48 libtcnative-1.la
lrwxrwxrwx 1 dengpei dengpei 23 2011-11-30 15:48 libtcnative-1.so -> libtcnative-1.so.0.1.20
lrwxrwxrwx 1 dengpei dengpei 23 2011-11-30 15:48 libtcnative-1.so.0 -> libtcnative-1.so.0.1.20
-rwxr-xr-x 1 dengpei dengpei 880487 2011-11-30 15:48 libtcnative-1.so.0.1.20
最后将这些文件 拷贝到 /usr/lib/
cp libtcnative-1* /usr/lib/
运行 正常。
相关文章推荐
- Tomcat启动报The APR based Apache Tomcat Native library ...解决办法
- [Liferay6.2]启动Tomcat提示APR不能在java类库路径中被找到的解决办法
- tomat在linux服务器上启动报The APR based Apache Tomcat Native library which allows ...java.library...异常解决方法
- tomcat启动时,一闪,出错的解决办法
- <TOMCAT>The APR based Apache Tomcat Native library的解决办法
- The APR based Apache Tomcat Native library 异常解决办法
- The APR based Apache Tomcat Native library which allows optimal performance in produc,Tomcat启动报错解决方法
- Tomcat 启动和关闭时关于Apache Portable Runtime的错误信息解决办法
- Tomcat 启动和关闭时关于Apache Portable Runtime的错误信息解决办法
- tomcat 启动出错 解决办法
- Eclipse中启动Tomcat服务器出错的解决办法
- Tomcat绿色版启动后一闪而过的解决办法
- tomcat启动不成功(点击startup.bat闪退)的解决办法
- Tomcat启动读取applicationContext.xml出错的解决方式
- apache不能启动解决办法
- APMServ错误解决办法:1、Apache启动失败,请检查相关配置
- Tomcat启动不了的解决办法
- 关于 tomcat 启动出错,帮忙解决
- 在Galileo Eclipse中启动Tomcat后,http://localhost:8080/无法访问,但是独立启动Tomcat却完全正常的解决办法
- tomcat启动Error ListenerStart解决办法