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

 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

转载于:https://www.cnblogs.com/nikolatesfei/p/5775254.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值