http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.27.tar.bz2Apache下载链接
在解压Apache源码包进入目录运行
#./configure --prefix=/usr/local/apach时出现:
................
checking for APR... no
configure: error: APR not found . Please read the documentation
用yum下载了Apr也没用,后来查找资料发现完整的APR实际上包含了三个开发包:apr、apr-util以及apr-iconv,每一个开发包分别独立开发,并拥有自己的版本。
解决办法
1.下载所需软件包:
1.wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
2.wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
3.wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
2.
解决apr not found问题>>>>>>
[[email protected]]# tar -zxf apr-1.4.5.tar.gz
[[email protected]]# cd apr-1.4.5
[[email protected]]# ./configure --prefix=/usr/local/apr
[[email protected]]# make
[[email protected]]# make install
解决APR-util not found问题>>>>
[[email protected]]# tar -zxf apr-util-1.3.12.tar.gz
[[email protected]]# cd apr-util-1.3.12
[[email protected]]#./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
[[email protected]]# make
[[email protected]]# make install
解决pcre问题>>>>>>>>>
[[email protected]]# unzip -o pcre-8.10.zip
[[email protected]]# cd pcre-8.10
[[email protected]]# ./configure --prefix=/usr/local/pcre
[[email protected]]# make
[[email protected]]# make install
上述所有make install 以后可以用echo $?的返回值来确认是否安装成功(返回值为0则成功,其他值为为安装成功)
现在再回头安装Apache并指定Apache,apr,apr-util以及apr-iconv的位置。
[[email protected]]# ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --wieh-apr-iconv=/usr/local/pcre
[[email protected]]# make
[[email protected]]# make install