Installing mod_jk

I'm running Linux (Debian 4) and I'm trying to install mod_jk to get Tomcat working with Apache.  I have apache2 and tomcat5 successfully installed and working, but I can't get the mod_jk connector to compile.

I download the latest source tarball, and run the configure script like this:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-apache=/usr/local/apache2/

Then I type make.

The make goes well for a while, but then about half way through gets all sorts of compilation errors, which seem to be related to the apr (apache portable runtime) include files.

The errors begin with:

In file included from /usr/local/apache2//include/ap_config.h:25,
                 from mod_jk.c:29:
/usr/local/apr/include/apr-1/apr.h:273: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'apr_off_t'
In file included from mod_jk.c:29:
/usr/local/apache2//include/ap_config.h:26:23: error: apr_hooks.h: No such file or directory
/usr/local/apache2//include/ap_config.h:27:32: error: apr_optional_hooks.h: No such file or directory

...And then there's a few hundred lines more of compiler errors.

Does anyone have any idea what might be happening here?
Who is Participating?
Syngin9Connect With a Mentor Commented:
This might be slightly off base as I don't really use Tomcat but that module is available under Apt for both Apache 1.3x. and 2.x:

libapache-mod-jk - Apache 1.3 connector for the Tomcat Java servlet engine
libapache2-mod-jk - Apache 2 connector for the Tomcat Java servlet engine
if you want to compile the module yourself you need the apache2 sources, at least the include files
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.