在安裝Apache的httpd的時候經常會遇到:
configure: error: APR not found . Please read the documentation.
configure: error: APR-util not found . Please read the documentation.
configure: error: pcre-config for libpcre not found. PCRE is required and available
網上也有文章指導如何下載後安裝這些依賴的檔案,本文
將這些依賴的檔案都打包在http://download.csdn.net/detail/kkdelta/4424852.
將下面所有檔案都放在 /root/wkr目錄
apr-1.4.6.tar.gz
apr-util-1.4.1.tar.gz
httpd-2.4.2.tar.gz
pcre-8.30.zip
1,安裝APR:
tar -zxvf apr-1.4.6.tar.gz
cd apr-1.4.6
./configure
make
make install
2,安裝APR-UTIL
#tar -zxvf apr-util-1.4.1.tar.gz
#cd apr-util-1.4.1
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#make
#make install
3安裝pcre
#unzip -o pcre-8.30.zip
#cd pcre-8.30
#./configure --prefix=/usr/local/pcre
#make
#make install
4安裝Apache
tar -xzvf httpd-2.4.2.tar.gz
cd httpd-2.4.2
./configure --prefix=/usr/local/apache/ --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
#make
#make install
5啟動Apache
cd /usr/local/apache/bin
./apachectl start
如果需要新版本:
http://httpd.apache.org/download.cgi
http://apr.apache.org/download.cgi
http://sourceforge.net/projects/pcre/