解决编译Apache出现的问题:configure: error: APR not found . Please read the documentation
在ubuntukylin-14.04-desktop-amd64中编译apache的httpd-2.4.10时出错:
checking for APR... no
configure: error: APR not found . Please read the documentation
解决方案:
1.下载所需软件包:
- 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.安装下载软件包
a:解决apr not found问题>>>>>>
root@ubuntu:/home/ubuntu/Downloads# tar xvf tar -zxf apr-1.4.5.tar.gz
root@ubuntu:/home/ubuntu/Downloads# cd apr-1.4.5
root@ubuntu:/home/ubuntu/Downloads/apr-1.4.5# ./configure --prefix=/usr/local/apr;make && make install
b:解决APR-util not found问题>>>>
root@ubuntu:/home/ubuntu/Downloads# tar -zxf apr-util-1.3.12.tar.gz
root@ubuntu:/home/ubuntu/Downloads# cd apr-1.4.5
root@ubuntu:/home/ubuntu/Downloads/apr-1.4.5# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr;make && make install
c:解决pcre问题>>>>>>>>>
root@ubuntu:/home/ubuntu/Downloads# unzip -o pcre-8.10.zip
root@ubuntu:/home/ubuntu/Downloads# cd pcre-8.10
root@ubuntu:/home/ubuntu/Downloads/apr-1.4.5# ./configure --prefix=/usr/local/pcre;make && make install
3.编译Apache的httpd-2.4.10时加上,
--with-apr=/usr/local/apr
--with-apr-util=/usr/local/apr-util/
--with-pcre=/usr/local/pcre
即可成功。
即:
root@ubuntu:/home/ubuntu/CHttpd/httpd-2.4.10# ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre; make && make install