1. 程式人生 > >出現錯誤日誌: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

div 錯誤日誌 a.out library logs openss product arc nec

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