The system is Ubuntu 13.04 (64-bit). [Update: also tried on a 12.04 TLS 64-bit, same result]
I compiled the latest (1.4.8) library (process described here ) and the files are readable by all:
$ 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:
LD_LIBRARY_PATH=/usr/local/apr/lib
I launched Tomcat's Java with -XshowSettings:properties
which shows java.library.path
contains that 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.
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:
sudo apt-get install libtcnative-1
If that does not work tomcat-native needs to be installed
Install Oracle java7:
Install tomcat apr:
Install tomcat tomcat-native:
I found the solution in the meantime. I also needed to install the native library support for Tomcat. Should anyone search for this, I downloaded tomcat-native-1.1.27-src (the latest at this time). 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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.