Linux上安裝Apache時,編譯出現錯誤:
apache
checking for APR... no configure: error: APR not found . Please read the documentation
安裝APR,下載所需軟件包,若是此時計算機能夠上網,執行命令下載文件:bash
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
apr not found問題:安裝apr包ide
tar -zxf apr-1.4.5.tar.gz cd apr-1.4.5 ./configure --prefix=/usr/local/apr make && make install
APR-util not found問題
spa
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
pcre問題.net
unzip -o pcre-8.10.zip cd pcre-8.10 ./configure --prefix=/usr/local/pcre make && make install
最後編譯Apache時加上:ip
--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
例如:get
./configure --prefix=/usr/local/apache2 --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre