About configure error APR not found. And exports. C: error_ hack_ apu_ Solution to the problem of redefining version ‘

Problems encountered in the installation of the source package

I. The problems encountered with the installation of the apache 2.4.37 source package are resolved as follows.

In the configuration . /configure –prefix=/usr/local/apache2 the following error occurs
Error 1.
checking for gcc… no checking for cc… no checking for cl.exe… no configure: error: in

This install gcc yum install -y gcc

Second, the beginning of the installation of the source package encountered problems.

Problems encountered after installing apr and apr-util and pcre

The solution steps are as follows.

This requires downloading apr

wget http://mirrors.cnnic.cn/apache/apr/apr-1.6.5.tar.gz
tar -zxvf apr-1.6.3.tar.gz
cp -r apr-1.6.3 /usr/local/src/httpd-2.4.37/srclib/apr
cd apr-1.6.3
./configure –prefix=/usr/local/apr
make && make install

error2: checking for APR-util… no configure: error: APR-util not found. Please read the documentation
wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.gz
tar -zxvf apr-util-1.6.1.tar.gz
cp -r apr-util-1.6.1 /usr/local/src/httpd-2.4.37/srclib/apr-util
cd apr-util-1.6.1
./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr
make
make install

Error3: pcre not found:

wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.42/pcre-8.42.zip

unzip -o pcre-8.10.zip

cp -r pcre-8.42/usr/local/src/httpd-2.4.37/srclib/pcre
cd pcre-8.42
./configure –prefix=/usr/local/pcre
make && make install (There may be g++: command not found, execute it under Centos

yum -y update gcc
yum -y install gcc+ gcc-c++, and after installing, run the previous step. (/configure…)

Compiling apr-util may also result in the error xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
I’ve checked the documentation and the expat library is missing
yum install expat-devel to install the library, compile it again after installation

 

Second, then reconfigure apache and compile and install

cd httpd-2.4.37
./configure –with-included-apr –prefix=/usr/local/apache2 –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util–with-pcre=/usr/local/pcre

make
make install

Similar Posts: