阿里云centos7.4 java1.8 以jar形式部署springboot工程,报错如下:
INFO: 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
最开始是直接从源安装,起了几次一直报错
yum install java
然后从java官网下载java安装,修改profile文件:
export JAVA_HOME=/usr/java/jdk1.8.0_171-amd64
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
再次运行还是报错,然后百度有人建议安装tomcat-native:
yum install tomcat-native
试了下,问题解决!