Solve the problem of checking for APR... no configure: error: APR not found. Please read the documentation when installing Apache

There is a problem with installing Apache compilation in Linux:

Solution:

1. Download the required software package

wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz  
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz  
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip  

2. In order to compile without error, it is best to install the compilation environment and tools first

yum -y install gcc+ gcc-c++

3. Solve the APR not found error

tar -zxf apr- 1.4 . 5 . tar .gz  
cd  apr-1.4.5  
./configure --prefix=/usr/local/apr  
make && make install 

4. Solve the problem of APR-util not found

tar -zxf apr-util- 1.3 . 12 . tar .gz  
cd apr-util-1.3.12  
./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config  
make && make install 

5. Solve the problem of pcre

unzip -o pcre-8.10.zip  
cd pcre-8.10  
./configure --prefix=/usr/local/pcre  
make && make install 

6. Finally compile and add

--with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre

7. Done.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324715019&siteId=291194637