溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

關(guān)于apache2.4.34源碼包安裝遇到的問題解決方法

發(fā)布時(shí)間:2020-07-21 21:25:25 來源:網(wǎng)絡(luò) 閱讀:398 作者:Asn_Fy 欄目:系統(tǒng)運(yùn)維

在 配置 ./configure --prefix=/usr/local/apache 出現(xiàn)以下錯(cuò)誤

報(bào)錯(cuò)1:

checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in

安裝gcc :yum install -y gcc

報(bào)錯(cuò)2:

pcre報(bào)錯(cuò) checking for pcre-config... false

解決辦法: yum install pcre pcre-devel

報(bào)錯(cuò)3:

checking for APR... no configure: error: APR not found. Please read the documentation

下載apr:wget http://mirrors.cnnic.cn/apache/apr/apr-1.6.3.tar.gz

tar -zxvf apr-1.6.3.tar.gz

cp -r apr-1.6.3 /usr/local/src/httpd-2.4.34/srclib/apr

cd apr-1.6.3

./configure --prefix=/usr/local/apr

make && make install

報(bào)錯(cuò)3.1:
checking for APR-util... no configure: error: APR-util not found. Please read the documentation

wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.gz

tar -zxvf apr-util-1.6.1.tar.gz

cp -r apr-util-1.6.1 /usr/local/src/httpd-2.4.34/srclib/apr-util

cd apr-util-1.6.1

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make

make install

在編譯apr-util 可能也會(huì)報(bào)錯(cuò)xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory

yum install expat-devel安裝該庫,安裝完再次編譯

然后重新配置apache 并編譯安裝:

cd httpd-2.4.34

./configure --with-included-apr --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --nable-mods-shared=most

make

make install

補(bǔ)充:
make[1]: 離開目錄“/usr/local/src/httpd-2.4.34/support”
make: *** [all-recursive] 錯(cuò)誤 1

解決辦法: make clean 然后重新./configure make

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI