编译安Apache2.4报错checking for APR... no configure: error: APR not found. Please read the documentation.

Apache2.4编译报错checking for APR… no configure: error: APR not found. Please read the documentation.

编译安Apache2.4报错checking for APR... no configure: error: APR not found. Please read the documentation._第1张图片

解决方法

1、下载所需软件包,要安装新版本:

  • wget wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.3.tar.gz
  • wget wget http://mirrors.shu.edu.cn/apache//apr/apr-util-1.6.1.tar.gz
  • wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip

编译安Apache2.4报错checking for APR... no configure: error: APR not found. Please read the documentation._第2张图片
2、解决apr not found问题

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

3、解决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 

4、解决pcre问题

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

5、最后如果报了checking for pcre-config… false configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/ 的错误,我们可以通过下面的命令来解决

yum -y install pcre-devel

最后我们就可以通过下面的参数来进行对Apache服务器来进行配置、编译、安装

./configure --prefix=/application/apache2.4.34 --with-apr-util=/usr/local/apr-util --with-apr=/usr/local/apr --with-pcre=/usr/local/pcre --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so --with-mpm=worker --enable-rewrite
make
make install

你可能感兴趣的:(软件安装)