0
votes

I find the following error when I installed httpd-2.2.21:

  checking for APR-util version 1.2.0 or later... no
  configure: error: APR-util version 1.2.0 or later is required

I've installed apr-1.4.5, apr-util-1.3.12. then i do configure:

./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite

I don't know why.

6

6 Answers

3
votes

I don't see this error in old apache httpd version, the new apache package has included apr source code under folder srclib, so if you see this error, just add with ./configure

--with-apr=$APACHE_SOURCE/srclib --with-apr-util=$APACHE_SOURCE/srclib  --with-included-apr
1
votes

When you download Apache (httpd 2.4), there is a directory which is called /srclib.

cd into that directory with cd /srclib. Open your browser and go to http://apr.apache.org/download.cgi and download the .apr files into the directory.

wget <link>

Unzip and extract it into srclib directory. After extracting, make sure you rename it just "apr"; example:

mv apr.1.5.1 apr 

Now, it should read the .apr files from that folder. After that it will ask for apr-utils too; make sure you follow the same procedure.

PS: The apr files in /usr/local are files which are already built. so they won't work.

1
votes

you need to install apr-util-1.5.4

Download it from archive.apache.org

./configure --prefix=/usr/local/src/httpd-2.4.17/srclib/apr-util/ --with-apr=/usr/local/src/httpd-2.4.17/srclib/apr/
0
votes

Looking at the documentation it appears the you should be giving the top level directory as the argument for the with-apr and with-apr-util options.

Try this:

./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite
0
votes

If you have bundled apr and apu installed (make sure you libapr1-dev and libaprutil1-dev installed), don't pass any argument for apr.

./configure --prefix=/usr/local/apache --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite

If you want to use the apr and apu included in srcdir, --with-included-apr will be enough to add as argument. Externally compiled apr/apu currently buggy. Update your source code and re-compile if you want to have up to date version.

0
votes

I found I experienced this problem under Solaris 11 with httpd-2.2.22. My config.log showed that the program testing the apr-util version produced a compile error because apu_version.h includes apr_version.h, but the test program did not include a -I directive for the apr include directory. I worked around this problem by providing the apr include directive explicitly in CPPFLAGS. Adapted to your example it would look like this:

CPPFLAGS="-I/usr/local/apr/include" ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite

Note that I have also modified your --with-apr and --with-apr-util clauses. I think these should both point to the top-level directory and not to the config program. YMMV.