Checking for apr no configure error apr not found please read the documentation

I am trying to install apache in my linux machine. But when I tried ./configure --prefix = /usr/local/apache it shows an error configure: error: APR not found. Please read the documentation. I tri...

I am trying to install apache in my linux machine. But when I tried ./configure --prefix = /usr/local/apache it shows an error configure: error: APR not found. Please read the documentation. I tried to install apr with yum install apr apr-deve and it says

Package apr-1.4.6-1.fc15.x86_64 already installed and latest version
No package apr-deve available.

Nothing to do
What should I do now? Please excuse I am a newbie to LINUX

asked Dec 20, 2012 at 7:21

AssamGuy's user avatar

2

Actualy I had to install aprutils also… So try using:

sudo apt-get install libapr1-dev libaprutil1-dev

answered Jan 9, 2014 at 17:58

lrepolho's user avatar

lrepolholrepolho

9311 gold badge12 silver badges23 bronze badges

4

In the directory where you have installed the apache httpd distribution there is a directory that is called /srclib

You cd into that directory cd /srclib.
Make sure you are in that folder. Now open your browser and go to http://apr.apache.org/download.cgi
and download the apr-*.tar.gz files into this directory.

wget <link>

Unzip and extract them into srclib directory
after extracting make sure you rename the apr-* directories to just «apr» and «apr-util», respectively. For example:

mv apr-1.6.5 apr
mv apr-util-1.6.1 apr-util

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

Hope this helps!

Jaap's user avatar

Jaap

61913 silver badges19 bronze badges

answered Feb 16, 2015 at 0:02

Joel Nishanth Ponukumatla's user avatar

3

If your install on apache 2.2 or less than add flag
—with-included-apr

If you are using 2.4 than you can go to https://apr.apache.org/download.cgi and download the latest apr and apr-util. Unpack them and move them into the apache source file into /srclib. Make sure they are named apr and apr-util not apr.x.x.x. Then you can use the —with-included-apr flag

answered Oct 13, 2014 at 13:27

morsik's user avatar

morsikmorsik

1,21014 silver badges17 bronze badges

For my linux rig, I got past this by downloading the apr-dev package using the local package manager:

opkg install libapr-1-dev

That was on Angstrom linux, so your command version will likely be different, replacing opkg with apt-get or whatever your distro’s package manager is.

answered Jun 9, 2013 at 1:10

baudot's user avatar

baudotbaudot

1,60119 silver badges33 bronze badges

1

There are several ways of doing this
download latest apr and apr-utils from https://apr.apache.org/

tar xzvf apr.XXX.tar.gz
tar xzvf apr-util,XXX.tar.gz

Solution 1
mv apr.XXX httpd.XYZ/srclib/apr
mv apr-util.XXX httpd.XYZ/srclib/apr-util

you should be able to see

ls httpd.XYZ/srclib/apr-util
apr apr-util

now cofigure apache via

./configure --with-included-apr --other-options-that-you-want

Solution 2

mv apr && ./configure && make && make install
mv apr-util && ./configure && make && make install
mv httpd.XYZ/
./configure --with-apr=/usr/local/apr -other-options-that-you-want

NOTE : /usr/local/apr (CENTOS),your Distro might use different one

answered Dec 16, 2016 at 13:22

Nitigya Sharma's user avatar

You have to download APR and APR-UTIL packages.
install the above downloaded packages from source using below commands
./configure -prefix=
make
make install

Then run your above mentioned command as below
./configure -prefix= -with-apr= -with-apr-util=

answered May 21, 2016 at 15:31

Haneef Mohammed's user avatar

The following command works on my mac.

Prerequisites:

brew install apr
brew install pcre

In fact, the link is missing, so http can’t be found

brew link apr
brew link pcre

Copy the prompt you see

vim ~/.bash_profile
export PATH="/usr/local/opt/apr/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/apr/lib"
export CPPFLAGS="-I/usr/local/opt/apr/include"
export PATH="/usr/local/opt/apr-util/bin:$PATH"

then, try again

source ~/.bash_profile
./configure

answered Jun 10, 2021 at 3:09

Jayce's user avatar

sudo apt-get install libapr1-dev libaprutil1-dev use this command in linux

answered Aug 8, 2019 at 5:40

pradeep karunathilaka's user avatar

Installing Apache HTTP is always fun. A few days back, I was installing Apache 2.4 on CentOS VM and encountered multiple errors.

I thought it would be helpful to put together for a reference.

APR not found

[root@chandan httpd-2.4.25]# ./configure --enable-ssl
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
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
configure: 
configure: Configuring Apache Portable Runtime library...
configure: 
checking for APR... no
configure: error: APR not found.  Please read the documentation.
[root@chandan httpd-2.4.25]#

APR stands for “Apache Portable Runtime” and needed to compile from the source. If you are in the same situation as me then following will rescue you.

First, you need to install APR.

  • Download the latest version of APR using wget
wget https://www-eu.apache.org/dist/apr/apr-1.6.3.tar.gz .
  • Extract the downloaded file
gunzip -c apr-1.6.3.tar.gz | tar xvf -
  • it will create a new folder “apr-1.6.3
  • Go inside and compile with configure command
./configure

It will take a few seconds and once done you will get a prompt back (ensure no error).

  • The last step would be to install using make command
make
make install

Once done, I tried installing Apache and got another error.

APR-util not found

[root@chandan httpd-2.4.25]# ./configure --enable-ssl --enable-so
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
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
configure: 
configure: Configuring Apache Portable Runtime library...
configure: 
checking for APR... yes
  setting CC to "gcc"
  setting CPP to "gcc -E"
  setting CFLAGS to " -g -O2 -pthread"
  setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE"
  setting LDFLAGS to " "
configure: 
configure: Configuring Apache Portable Runtime Utility library...
configure: 
checking for APR-util... no
configure: error: APR-util not found.  Please read the documentation.
[root@chandan httpd-2.4.25]#

In case you have “APR-util not found” error as well then you got to install the following.

  • Download the latest APR-util source
wget https://www-eu.apache.org/dist/apr/apr-util-1.6.1.tar.gz .
  • Extract the downloaded gz file
gunzip -c apr-util-1.6.1.tar.gz | tar xvf -
  • Go inside the newly created folder “apr-util-1.6.1” and install using the following commands
./configure --with-apr=/usr/local/apr/bin/apr-1-config
make
make install

Tried installing Apache again and got another error.

pcre-config for libpcre not found

This is what I got.

checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for gcc option to accept ISO C99... -std=gnu99
checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

PCRE stands for Perl Compatible Regular Expressions, and this error got an easy solution. You just to install pcre-devel package.

yum install pcre-devel

Not over yet, got another in next attempt related to OpenSSL.

OpenSSL version is too old

checking whether to enable mod_slotmem_plain... no
checking whether to enable mod_ssl... checking dependencies
checking for OpenSSL... checking for user-provided OpenSSL base directory... ./configure: line 25426: cd: /usr/bin/openssl: Not a directory
/root/httpd-2.4.25
  adding "-I/root/httpd-2.4.25/include" to CPPFLAGS
  setting MOD_CFLAGS to "-I/root/httpd-2.4.25/include"
  setting ab_CFLAGS to "-I/root/httpd-2.4.25/include"
  adding "-L/root/httpd-2.4.25/lib" to LDFLAGS
  setting MOD_LDFLAGS to "-L/root/httpd-2.4.25/lib"
checking for OpenSSL version >= 0.9.8a... FAILED
configure: WARNING: OpenSSL version is too old
no
checking whether to enable mod_ssl... configure: error: mod_ssl has been requested but can not be built due to prerequisite failures
[root@chandan httpd-2.4.25]#

The first thing you have to ensure you have the latest version of OpenSSL which was in my case, so I needed to install the devel package, and it was all right.

yum install openssl-devel

xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory

While compiling APR, I got this error.

[root@instance-1 apr-util-1.6.1]# make
make[1]: Entering directory `/opt/temp/apr-util-1.6.1'
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread   -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/opt/temp/apr-util-1.6.1/include -I/opt/temp/apr-util-1.6.1/include/private  -I/usr/local/apr/include/apr-1    -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
 #include <expat.h>
                   ^
compilation terminated.
make[1]: *** [xml/apr_xml.lo] Error 1

If you are getting this error, then this can be resolved by installing expat-devel package.

yum install expat-devel

configure: error: no acceptable C compiler found in $PATH

C compiler not found is typical for any software build, and you can fix this by installing the compiler.

yum install gcc

nghttp2 version is too old

This is specific to when you try to install Apache with HTTP/2. You will get the following error.

checking whether to enable mod_http2... checking dependencies
checking for OpenSSL... (cached) yes
  setting MOD_LDFLAGS to "  -lssl -lcrypto -lrt -lcrypt -lpthread"
  setting MOD_CFLAGS to " "
  setting MOD_CPPFLAGS to "-DH2_OPENSSL"
checking for nghttp2... checking for user-provided nghttp2 base directory... none
checking for pkg-config along ... checking for nghttp2 version >= 1.2.1... FAILED
configure: WARNING: nghttp2 version is too old
no
checking whether to enable mod_http2... configure: error: mod_http2 has been requested but can not be built due to prerequisite failures

And, if so, you can fix by installing nghttp2 as below.

  • Download the latest version of nghttp2 from here
wget https://github.com/nghttp2/nghttp2/releases/download/v1.37.0/nghttp2-1.37.0.tar.gz
  • Extract the downloaded file
tar -xvf nghttp2-1.37.0.tar.gz
  • It will create a new folder, go inside that and run the following
./configure
make
make install

Once done without error, run the Apache source build with HTTP2 again. It should be alright.

Finally, I was able to install Apache successfully. If you are interested in learning about Apache HTTP Server Administration, then check out this online course.

During Apache httpd installation if you get below error, that means Apache Portable Run-time environment was not found or not installed.

checking for APR... no
configure: error: APR not found.  Please read the documentation.

and/or

checking for APR-util... no
configure: error: APR-util not found. Please read the documentation.

So install APR and APR-util and give httpd those paths. Httpd will be happy to run for you after that… 🙂

Go further if you want to know how to install APR.

You can download APR and APR-util from here.

Then extract those to separate folders.

First change to the extract APR directory and install it. (Tip: cd command to change directory)

sudo ./configure --prefix=<apr-path>

sudo make

sudo make install

So you have a working APR. Next is APR-util.

Change to the extract APR-Util directory and install it. (Tip: cd command to change directory)

sudo ./configure --prefix=<apr-util-path> --with-prefix=<apr-path>

sudo make

sudo make instal

Install zlib packages with the command (optional; you can turn this off at your will):

yum install zlib zlib-devel

Apart from APR and APR-Util, you may need to install pcre too. So download it from here first.

Change to the directory and use the below commands to install.

sudo ./configure --prefix=<pcre-path>

sudo make

sudo make install

Now lets make httpd understand that we have a working pcre, APR and APR-util.

./configure --enable-file-cache --enable-cache --enable-disk-cache --enable-mem-cache --enable-deflate --enable-expires --enable-headers --enable-usertrack --enable-cgi --enable-vhost-alias --enable-rewrite --enable-so --prefix=<httpd-path> --with-apr=<apr-path> --with-apr-util=<apr-util-path> --with-pcre=<pcre-path>

# Rest is history make make install

Sreejith

A strong believer of:
1. Knowledge is power
2. Progress comes from proper application of knowledge
3. Reverent attains wisdom
4. For one’s own salvation, and for the welfare of the world
View all posts by Sreejith

Apache httpd source installation prompt APR error

1. Download HTTPD source package

https://www.apache.org/

Choose the site of Chinese domain name cn:

Find httpd:

2. Back in Linux CentOS, download the httpd compressed package using the wget name:

[root@magedu ~]# wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.38.tar.gz
    --2019-07-21 13:16:50--  https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.38.tar.gz
    Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.8.193, 2402:f000:1:408:8100::1
    Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.8.193|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 9187294 (8.8M) [application/x-gzip]

3. Unzip and download files;

[root@magedu ~]# tar zxvf httpd-2.4.38.tar.gz 
            httpd-2.4.38/
            httpd-2.4.38/config.layout
            httpd-2.4.38/configure.in
            httpd-2.4.38/Makefile.win
            httpd-2.4.38/configure
            httpd-2.4.38/test/
            httpd-2.4.38/test/test_parser.c
            httpd-2.4.38/test/check_chunked
            httpd-2.4.38/test/make_sni.sh
            httpd-2.4.38/test/README
            httpd-2.4.38/test/test-writev.c
            httpd-2.4.38/test/test_limits.c
            httpd-2.4.38/test/tcpdumpscii.txt

4. Install the compiler and development kit before decompressing.

    `   [root@magedu ~]# yum install gcc "Developent Tools"`

5. Enter the decompressed httpd directory to see the help information of configure

    [root@magedu ~]# cd httpd-2.4.38/
    [root@magedu httpd-2.4.38]# ./configure --help

6. Installation using configuration files

    [root@magedu httpd-2.4.38]# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
            checking for chosen layout... Apache
            checking for working mkdir -p... yes
            checking for grep that handles long lines and -e... /usr/bin/grep
            checking for egrep... /usr/bin/grep -E
            checking build system type... x86_64-pc-linux-gnu
            checking host system type... x86_64-pc-linux-gnu
            checking target system type... x86_64-pc-linux-gnu
            configure: 
            configure: Configuring Apache Portable(Transplantation) Runtime library(Runtime libraries)...
            configure: 
            checking for APR... no
            configure: error: APR not found.  Please read the documentation.(Error: APR No, please read the document.

Tips for error reporting:
Congure: error: APR not found. Please read the documentation. (Error: APR not found, please read the document)
Tips do not find APR, use yum to install, but must pay attention to the installation, tips to install which software, usually add devel after the software, that is to say, to install the lack of software development tools, such as this tip apr, it is necessary to install apr-devel:

#yum install apr-devel

After the installation is completed, then. / configure;
In particular, during this period, you can not switch to other directories, the entire installation process must be in the root directory of the installation software;

[root@magedu httpd-2.4.38]# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for APR-util... no
configure: error: APR-util not found.  Please read the documentation.

Hint for missing apr-util, then install the development version of apr-util, apr-util-devel

root@magedu httpd-2.4.39]# yum install apr-util-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: libdb-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Running transaction check
...

After the installation is complete, then. / configure

[root@magedu httpd-2.4.38]# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

Prompt PCRE to report an error and install pcre. This PCRE also has to install the development version, that is, install pcre-devel:

[root@magedu httpd-2.4.39]# yum install pcre-devel -y

After the installation is complete, then. / configure

# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure: 
...
config.status: creating include/ap_config_auto.h
config.status: executing default commands
configure: summary of build options:

                 Server Version: 2.4.39
                 C compiler:     gcc -std=gnu99
                CFLAGS:           -pthread  
                CPPFLAGS:        -DLINUX -D_REENTRANT -D_GNU_SOURCE  
               LDFLAGS:           
                 LIBS:             
                 C preprocessor: gcc -E

Eventually succeeded, using echo$? Check whether it succeeded:

[root@magedu httpd-2.4.39]# echo $?
                    0

Then use make

[root@magedu httpd-2.4.39]# make
Making all in srclib
make[1]: Entering directory `/soft/httpd-2.4.39/srclib'
make[1]: Leaving directory `/soft/httpd-2.4.39/srclib'
Making all in os

Finally: make install
[root@magedu httpd-2.4.39]#make install

7. After completion, configure PATH variable and man manual. After completion, start the service, login address and test page appear, which means the installation is successful.

Because I need a bug fix which is not available in Ubuntu’s repository version of subversion, I am installing it from source.

On running ./configure, I get an error:

configure: WARNING: APR not found
The Apache Portable Runtime (APR) library cannot be found.
Please install APR on this system and supply the appropriate
--with-apr option to 'configure'

or

get it with SVN and put it in a subdirectory of this source:

   svn co 
    http://svn.apache.org/repos/asf/apr/apr/branches/1.2.x 
    apr

Run that right here in the top level of the Subversion tree.
Afterwards, run apr/buildconf in that subdirectory and
then run configure again here.

Whichever of the above you do, you probably need to do
something similar for apr-util, either providing both
--with-apr and --with-apr-util to 'configure', or
getting both from SVN with:

   svn co 
    http://svn.apache.org/repos/asf/apr/apr-util/branches/1.2.x 
    apr-util

configure: error: no suitable apr found

Notes:

1) I have already installed libapr1

2) I am not able to install svn client, to follow the instructions in the error message (apt-get install svn — no package found — I have main, universe, restricted, multiverse in sources.list)

Понравилась статья? Поделить с друзьями:
  • Check your browser compatibility and vbscript support ddt2000 как исправить
  • Check your address there appears to be an error in it перевод
  • Check usb favostix как исправить
  • Check urea system как сбросить ошибку
  • Check the system event log for error messages