"You must specify a valid --with-apxs path" when building mod_jk on ubuntu

bachr picture bachr · Jul 3, 2014 · Viewed 9.9k times · Source

I'm trying to build mod_jk for Apache on ubuntu, but when I issue:

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

I got the following error:

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/Arbi/Downloads/tomcat-connectors-1.2.40-src/native/scripts/build/unix/missing: Unknown `--is-lightweight' option
Try `/home/Arbi/Downloads/tomcat-connectors-1.2.40-src/native/scripts/build/unix/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for test... /usr/bin/test
checking for grep... /bin/grep
checking for echo... /bin/echo
checking for sed... /bin/sed
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
could not find /usr/local/apache/bin/apxs
configure: error: You must specify a valid --with-apxs path

Apache is already installed, and the directory /usr/local/apache/bin/ exists, also apxs can be found there! Any idea why I'm having this error and how I can build mod_jk?

Answer

ofner01 picture ofner01 · Jul 29, 2019

I had the same issue, but I have a solution.

First, I do not find out why the apxs file is not found by the system.

But alternative you can define the Apache directory with the option

--with-apche=DIR

example:

./configure --with-apache=/usr/local/bin/apache