linux 安裝Apache遇到的奇葩問題
使用Apache2.4.8版本,./configure沒有報錯,執行make時報錯,如下:
make[2]: *** [exports.lo] Error 1
make[2]: Leaving directory `/usr/local/src/httpd-2.4.29/server‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.4.29/server‘
make: *** [all-recursive] Error 1
環境說明:
使用apr版本為1.6.3 ,apr-util版本為1.6.1;已經單獨編譯安裝成功;
編譯參數為:
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre --enable-mods-shared=most --enable-so
解決辦法:
在configure後加上 “--with-included-apr”。再重新編譯, make, make install. 即可。
問題又來了,加上--with-included-apr之後,編譯,報錯如下:
configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.
錯誤為:apr,apr-util缺失,需要下載並解壓到./srclib/目錄下
解決辦法:
# cd /usr/local/src/
# cp -r apr-16.3 /usr/local/src/httpd-2.4.29/srclib/apr
# cp -r apr-util-1.6.1/usr/local/src/httpd-2.4.29/srclib/apr-util
再次執行./configure就不會報錯,make,make install也不會報錯;
linux 安裝Apache遇到的奇葩問題