An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24

17,583

Solution 1

I created a script for compiling Apache Tomcat Native library:

#!/bin/bash

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

wajig 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

Solution 2

You have to upgrade your Tomcat native library to a newer version:

sudo apt-get upgrade libtcnative-1

Solution 3

You can simply do that by installing apr from source and then specify in your setenv the path to library . Set this in your setenv.sh

export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'

You can follow more here http://www.sheroz.com/installing-apache-tomcat-native-linux-ubuntu-1204

Solution 4

From the error its clear that your tomcat native is of older version (1.1.22) and service looks for much newer version at least 1.1.24. The latest and stable version of tomcat native is 1.1.27. You can install that. Use the following link to install and fix your current issue.

Share:
17,583
confile
Author by

confile

Java, GWT, JavaScript, Grails, Groovy, Swift, Objective-C, iOS

Updated on August 16, 2022

Comments

  • confile
    confile over 1 year

    I installed apache apr on ubuntu 10.04 with

    sudo apt-get install libtcnative-1
    

    When I stated my tomcat I got the following error:

    Aug 07, 2013 6:57:32 PM org.apache.catalina.core.AprLifecycleListener init
    SEVERE: An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24
    

    How do I have to fix that error?

  • ρяσѕρєя K
    ρяσѕρєя K over 7 years
    Add some explanation with answer for how this answer help OP in fixing current issue
  • Dejan
    Dejan over 7 years
    This line of code should upgrade Tomcat native library. I had similar problem.
  • nightfury
    nightfury about 5 years
    does it increments the tomcat version or it updates to the latest available patch ?