failed to compile log4cxx in Ubuntu12. error is apr

528 Views Asked by At

Follow instruction with this link include this apt-get install libapr1 libaprutil1

When run ./configure --prefix=/usr i am getting error:

configure: error: APR could not be located. Please use the --with-apr option.

any advice please.

Thank you

2

There are 2 best solutions below

0
On BEST ANSWER

need also to run the following:

apt-get install libapr1-dev libaprutil1-dev
0
On

I created a script for Ubuntu Server 12.0.4:

#!/bin/bash

export APR_PATH=/usr/bin/apr-1-config
export JAVA_HOME=/opt/java
export TOMCAT_HOME=/opt/tomcat
export INSTALL_PREFIX=/usr

apt-get install libaprutil1-dev make

cd /tmp
rm -Rf tomcat-native-*
tar -zxf $TOMCAT_HOME/bin/tomcat-native.tar.gz
cd /tmp/tomcat-native-*/jni/native

./configure --with-apr=$APR_PATH --with-java-home=$JAVA_HOME --prefix=$INSTALL_PREFIX
make && make install