您好,登錄后才能下訂單哦!
在 配置 ./configure --prefix=/usr/local/apache 出現以下錯誤
報錯1:
checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in
安裝gcc :yum install -y gcc
報錯2:
pcre報錯 checking for pcre-config... false
解決辦法: yum install pcre pcre-devel
報錯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
報錯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 可能也會報錯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
補充:
make[1]: 離開目錄“/usr/local/src/httpd-2.4.34/support”
make: *** [all-recursive] 錯誤 1
解決辦法: make clean 然后重新./configure make
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。