tomcat8启动异常:APR/native library which is not available

2024-05-08 17:58

本文主要是介绍tomcat8启动异常:APR/native library which is not available,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

cetos7.0环境下启动tomcat8,报如下错误

Tomcat ans APR lib : requires the APR/native library which is not available

查看tomcat配置文件service.xml

 <Connector port="18702" protocol="org.apache.coyote.http11.Http11AprProtocol"connectionTimeout="20000"redirectPort="8443" maxThreads="500"minSpareThreads="20"acceptCount="100"disableUploadTimeout="true"enableLookups="false"URIEncoding="UTF-8"/>

这是因为配置里面指定使用协议是org.apache.coyote.http11.Http11AprProtocol,即需要用APR运行模式,但这并不是tomcat默认的运行模式(此外还有bio和nio模式),需要额外安装apr和native的包才行。

需要安装以下几个包

  1. openssl-1.0.2(支持http2.0的话需要1.0.2以上版本,此处安装的openssl-1.0.2k
  2. apr
  3. apr-util
  4. tomcat-native(这个包在tomcat的bin目录下带的有)

安装过程

1、安装openssl

tar xzvf openssl-1.0.2k.tar.gz
 cd openssl-1.0.2k
./config --prefix=/usr/local/openssl --shared
 make
 make test 
 make install
mv /usr/bin/openssl /usr/bin/openssl.OFF  
mv /usr/include/openssl /usr/include/openssl.OFF  
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl  
ln -s /usr/local/openssl/include/openssl /usr/include/openssl  
echo "/usr/local/openssl/lib">>/etc/ld.so.conf  
ldconfig -v  
openssl version -a 

2、安装apr
tar -zxvf apr-1.5.2.tar.gz
cd apr-1.5.2
./configure --prefix=/usr/local/apr
make
make install

3、安装apr-util
 tar zxvf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4
 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv
make 
make install

4、安装tomcat-native
cd ******    #tomcat安装路径
tar -zxvf  tomcat-native.tar.gz
cd tomcat-native-1.2.10-src/native
./configure --with-apr=/usr/local/apr --with-java-home=/opt/jdk1.7.0_67 --with-ssl=/usr/local/openssl
make
make install

 

 

 

 

 

 

这篇关于tomcat8启动异常:APR/native library which is not available的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/971030

相关文章

Docker启动异常

报错信息: failed to start daemon: Error initializing network controller: error creating default "bridge" network: cannot create network b8fd8c684f0ba865d4a13d36e5282fd694bbd37b243c7ec6c9cd29416db98d4b (d

IIS10和Tomcat8整合

在网上找了很久,也试了很多,都没有弄好。后来根据这个博客,做一些小修小改,终于成功了。 我是从里面的IIS与TOMCAT整合那里开始看的。第一步上面要创建一个注册表,我没有创建。我是创建了一个名为“isapi_redirect.properties”的文件,放进tomcat安装目录的conf文件夹里面。里面内容为: # Configuration file for the Jakarta

小车启动底盘功能包

传感器与小车底盘的集成 新建功能包 catkin_create_pkg mycar_start roscpp rospy std_msgs ros_arduino_python usb_cam ydlidar_ros_driver 功能包下创建launch文件夹,launch文件夹中新建launch文件,文件名start.launch。 内容如下 <!-- 机器人启动文件:1.启动底盘2

Web容器启动时加载Spring分析

在应用程序web.xml中做了以下配置信息时,当启动Web容器时就会自动加载Spring容器。 [java]  view plain copy print ? <listener>          <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

Linux开机自动启动ORACLE设置

Redhat init简介: Linux启动时,会运行一个init程序,然后由init来启动后面的任务,包括多用户环境(inittab中设定)和网络等。运行级就是当前程序运行的功能级别,这个级别从1到6,具有不同的功能。这些级别在/etc/inittab(其他发行版这个文件位置不同)中指定,该文件就是init程序寻找的主要文件。最先运行的服务放在/etc/rc.d目录下。

Mac 本地启动 Dify

本地启动 dify 拉取 dify 文件 git clone https://github.com/langgenius/dify.git 启动底层服务 cd dify/dockerdocker-compose -f docker-compose.middleware.yaml -p dify up -d 启动后端 API 安装 poetry brew install poet

已解决javax.management.BadStringOperationException异常的正确解决方法,亲测有效!!!

已解决javax.management.BadStringOperationException异常的正确解决方法,亲测有效!!! 目录 问题分析 出现问题的场景 报错原因 解决思路 解决方法 分析错误日志 检查字符串值合法性 确认字符串格式 优化代码逻辑 增加输入验证和错误处理 总结 博主v:XiaoMing_Java 问题分析 javax.manag

Android Framework学习(四)之Launcher启动流程解析

在之前的博客中,我们学习了init进程、Zygote进程和SyetemServer进程的启动过程,我们知道SystemServer进程主要用于启动系统的各种服务,二者其中就包含了负责启动Launcher的服务,LauncherAppService,本篇博客我们将一起学习Launcher相关的知识。 Launcher概述 Launcher程序就是我们平时看到的桌面程序,它其实也是一个Androi

Android Framework学习(三)之SyetemServer进程启动解析

从上篇博客中,我们知道了Zygote进程启动了SyetemServer进程,本篇博客我们就一起来学习SyetemServer进程。 SystemServer的作用 整个系统的android framework进程启动流程如下: init进程 –> Zygote进程 –> SystemServer进程 –>各种应用进程 SystemServer进程主要的作用是启动各种系统服务,比如Activ