4

I want to build the latest stable version of apache2.

I downloaded the source and put APR & APR-util in the srclib folder, then changed directories to ./srclib/apr and ran:

./configure --prefix=/usr/local/apr
sudo make
sudo make install

This seemed to install APR ok, but when I run ./configure from the apr-util directory, I receive the error:

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

Using ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr, the error becomes:

checking for APR... configure: error: the --with-apr parameter is incorrect.
It must specify an install prefix, a build directory, or an apr-config file.

Why can't it find APR?

5 Answers 5

4

it is not advisable to put each tool in separate directory. just try using --prefix=/usr/local for both APR & APR-Util. or, if you must, use --with-apr=/usr/local/apr/lib

1
  • Mine reads checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file. Then it works with --prefix=/usr/local --with-apr=/usr/local. The versions are: apr-1.5.2 and apr-util-1.5.4.
    – xb.
    Oct 5, 2015 at 12:48
2

I installed APR and APR-UTIL on my Redhat

APR location: /usr/local/apr

Then

APR-UTIL install cmd:

  1. ./configure --with-apr=/usr/local/apr/
  2. make
  3. make install
1

If you followed this tutorial: http://httpd.apache.org/docs/2.2/install.html

# cd srclib/apr
# ./configure --prefix=/usr/local/apr-httpd/
# make
# make install**

then you should go for

# cd ../apr-util
# ./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/bin/apr-2-config
0

This might happen if your current user doesn't have proper permission for the

/usr/local/apr

directory. Grant Read/Write permission for the above folder for the current user.

0

Follow below steps it will resolve everything

yum install gcc
yum install openssl-devel
yum install expat-devel
yum install pcre-devel

wget https://www-eu.apache.org/dist/apr/apr-util-1.6.1.tar.gz .
wget https://www-eu.apache.org/dist/apr/apr-1.6.5.tar.gz .
wget https://downloads.apache.org//httpd/httpd-2.4.48.tar.gz .
httpd-2.4.46.tar.gz

Extract all of these files at /opt/WebServer/

mv apr-util-1.6.1 httpd-2.4.46/srclib/apr-util
mv apr-1.6.5 httpd-2.4.46/srclib/apr
cd /opt/WebServer/httpd-2.4.46
./configure --enable-ssl --enable-so --prefix=/opt/WebSever/
make
make install

WebServer will be installed at /opt/WebSever/

You must log in to answer this question.