編譯安Apache2.4報錯checking for APR... no configure: error: APR not found. Please read the documentation.
阿新 • • 發佈:2019-01-23
Apache2.4編譯報錯checking for APR… no configure: error: APR not found. Please read the documentation.
解決方法
1、下載所需軟體包,要安裝新版本:
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