码迷,mamicode.com
首页 > Web开发 > 详细

The APR based Apache Tomcat Native library tomcat启动错误

时间:2016-08-16 10:23:51      阅读:322      评论:0      收藏:0      [点我收藏+]

标签:

 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模块导致的错误。

 

1.安装APR

wget http://apache.mirror.phpchina.com/apr/apr-1.3.2.tar.gz  
tar zxvf apr-1.3.2.tar.gz  
cd apr-1.3.2  
./configure  
make  
make install  
apr 默认安装在 /usr/local/apr 

2.安装apr-util

wget http://apache.mirror.phpchina.com/apr/apr-util-1.3.2.tar.gz  
tar zxvf apr-util-1.3.2.tar.gz  
cd apr-util-1.3.2  
./configure --with-apr=/usr/local/apr  
make  
make install  
安装 tomcat-native 

3.安装tomcat-native

    在tomcat/bin目录下已有安装包

cd /usr/local/tomcat/bin  

tar zxvf tomcat-native.tar.gz
cd tomcat-native-1.2.7-src/native

./configure --with-apr=/usr/local/apr --with-java-home=/usr/local/java
make  
make install 

-----------------------------------------------------------------------------------------------------------------------------------------------

在这里出现了安装错误

checking for gcc option to accept ISO C89... none needed
checking for OpenSSL library... using openssl from /usr/lib and /usr/include
checking OpenSSL library version >= 1.0.2...
Found   OPENSSL_VERSION_NUMBER 0x10000003 (OpenSSL 1.0.0 29 Mar 2010)
Require OPENSSL_VERSION_NUMBER 0x1000200f or greater (1.0.2)
configure: error: Your version of OpenSSL is not compatible with this version of tcnative

由错误可知openssl的版本过低

升级openssl

查看升级操作

-----------------------------------------------------------------------------------------------------------------------------------------------

4.设置APR的环境变量

vi /etc/profile

后面添加

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib

使设置生效

source /etc/profile

The APR based Apache Tomcat Native library tomcat启动错误

标签:

原文地址:http://www.cnblogs.com/nikolatesfei/p/5775254.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!