简体   繁体   English

如果存在并配置了Tomcat APR本机库,即使没有加载*甚至*

[英]Tomcat APR native library not loaded *even* when present and configured

The system is Ubuntu 13.04 (64-bit). 系统是Ubuntu 13.04(64位)。 [Update: also tried on a 12.04 TLS 64-bit, same result] [更新:也在12.04 TLS 64位上尝试过,结果相同]

I compiled the latest (1.4.8) library (process described here ) and the files are readable by all: 我编译了最新的(1.4.8)库( 此处描述过程),并且所有文件都可读:

$ ll /usr/local/apr/lib
-rw-r--r-- 1 root root    8351 Sep 12 19:29 apr.exp
-rw-r--r-- 1 root root 1608792 Sep 12 19:29 libapr-1.a
-rwxr-xr-x 1 root root     965 Sep 12 19:29 libapr-1.la*
lrwxrwxrwx 1 root root      17 Sep 12 19:29 libapr-1.so -> libapr-1.so.0.4.8*
lrwxrwxrwx 1 root root      17 Sep 12 19:29 libapr-1.so.0 -> libapr-1.so.0.4.8*
-rwxr-xr-x 1 root root  925622 Sep 12 19:29 libapr-1.so.0.4.8*
drwxr-xr-x 2 root root    4096 Sep 12 19:29 pkgconfig/

The environment variable is set in .bashrc and it's loaded: 环境变量在.bashrc中设置,并已加载:

LD_LIBRARY_PATH=/usr/local/apr/lib

I launched Tomcat's Java with -XshowSettings:properties which shows java.library.path contains that path. 我使用-XshowSettings:properties启动了Tomcat的Java,它显示了java.library.path包含该路径。

java.library.path = /usr/local/apr/lib
    /usr/java/packages/lib/amd64
    /usr/lib64
    /lib64
    /lib
    /usr/lib

Still, when Tomcat starts I get a message it didn't find it even though it displays the path to that directory. 尽管如此,当Tomcat启动时,我仍然收到一条消息,即使它显示了该目录的路径,也没有找到它。

Sep 12, 2013 8:14:12 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/apr/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

I'm really at a loss what could be the cause. 我真的很茫然,可能是原因造成的。

Thank you very much for any pointers. 非常感谢您提供任何指导。

Installation the native library on Ubuntu server with: 使用以下命令在Ubuntu服务器上安装本机库:

sudo apt-get install libtcnative-1

If that does not work tomcat-native needs to be installed 如果不起作用,则需要安装tomcat-native

  1. Install Oracle java7: 安装Oracle java7:

    • sudo add-apt-repository ppa:webupd8team/java sudo add-apt-repository ppa:webupd8team / java
    • sudo apt-get update sudo apt-get更新
    • sudo apt-get install oracle-java7-installer sudo apt-get安装oracle-java7-installer
    • sudo apt-get install oracle-java7-set-default sudo apt-get install oracle-java7-set-default
  2. Install tomcat apr: 安装tomcat apr:

  3. Install tomcat tomcat-native: 安装tomcat tomcat-native:

I found the solution in the meantime. 在此期间,我找到了解决方案。 I also needed to install the native library support for Tomcat. 我还需要安装对Tomcat的本机库支持 Should anyone search for this, I downloaded tomcat-native-1.1.27-src (the latest at this time). 如果有人搜索此文件,我下载了tomcat-native-1.1.27-src(当前最新版本)。 The commands are below. 命令如下。

cd tomcat-native-1.1.27-src/jni/native
./configure --with-apr=/usr/local/apr --with-java-home=/home/foo/jdk1.7.0_25 --with-ssl=yes
make
sudo make install

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tomcat ans APR lib : 需要不可用的 APR/native 库 - Tomcat ans APR lib : requires the APR/native library which is not available 安装了基于APR的Apache Tomcat Native库的不兼容版本1.1.12,而Tomcat需要1.1.17版本 - An incompatible version 1.1.12 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.17 在java.library.path上找不到基于APR的Apache Tomcat Native库 - The APR based Apache Tomcat Native library was not found on the java.library.path 在java.library.path中找不到基于APR的Apache Tomcat Native库,它可以在生产环境中实现最佳性能 - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path 如何为 Tomcat 本机/APR SSL 启用调试日志记录 - How to enable debug logging for Tomcat native/APR SSL tomcat和apr中的SSL配置 - SSL configuration in tomcat and apr 带有嵌入式 Tomcat 的 APR - Spring - APR with Embedded Tomcat - Spring 当我在外部 tomcat 中重新部署战争文件时,本机库 mssql-jdbc_auth-8.4.1.x64.dll 已经加载到另一个类加载器中 - Native library mssql-jdbc_auth-8.4.1.x64.dll already loaded in another classloader when I redeploy the war file in external tomcat 在Tomcat8中重新加载应用程序期间,java.lang.UnsatisfiedLinkError本机库已加载到另一个类加载器中 - java.lang.UnsatisfiedLinkError Native Library already loaded in another classloader during app reload in Tomcat8 如何在Tomcat中添加本机库? - How to add a native library in Tomcat?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM