首页 > 代码库 > 出现错误日志:The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
出现错误日志:The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
tomcat6出现错误日志:
信息: 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
解决:
通过安装和配置apr解决。
Tomcat Native 可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。
1.安装:yum -y install openssl-devel
2.下载:apr-1.4.6.tar.gz、apr-util-1.4.1.tar.bz2、tomcat-native-1.1.19-src.tar.gz
(下载地址:http://archive.apache.org/dist/tomcat/tomcat-connectors/native/)
3.安装apr:
tar -xzf apr-1.4.6.tar.gz
cd apr-1.4.6
./configure && make && make install
tar -xjf apr-util-1.4.1.tar.bz2
cd apr-util-1.4.1
./configure --with-apr=/usr/local/apr && make && make install
tar -xzf tomcat-native-1.1.19-src.tar.gz
cd /opt/tomcat-native-1.1.19-src/jni
./configure --with-apr=/usr/local/apr --with-java-home=/opt/jdk && make && make install
4.设置apr的环境变量:
vi /etc/profile
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
保存退出
source /etc/profile
再查看catalina.out日志,发现不再报错了:
信息: An older version 1.1.19 of the APR based Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of 1.1.22
出现错误日志:The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。