天天看點

安裝源碼httpd-2.4.1錯誤解決辦法

apache常見錯誤總結:

1、./configure報錯

Configuring Apache Portable Runtime library ...

checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.

解決辦法:

下載下傳安裝

apr:http://apache.etoak.com//apr/apr-1.4.6.tar.gz

apr-utils:http://apache.etoak.com//apr/apr-util-1.4.1.tar.gz

或者yum -y install apr apr-util

checking for pcre-config... false

configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

解決辦法:

[root@www httpd-2.4.1]# yum -y install pcre-devel

2、啟動報錯:

[root@www bin]# service httpd start

故障1:AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message

httpd (pid 912) already running

其實在這裡并不是報錯,隻是個提醒資訊,解決辦法比較多

(1)、在/etc/hosts寫下目前ip與主機名的對應關系

(2)、在本機指能解析本機主機名的DNS

(3)、修改主配置檔案,找到ServerName這一行寫入本機主機名

故障2:Name or service not known: AH01564: unable to find IPv4 address of "2015120415424"

AH00016: Configuration Failed

原因是主機名為數字,隻需将主機名更改為非純數字,修改完成後再/etc/hosts中将原來的主機名替換為新修改的,如果沒有原主機名,那麼就添加一行:

127.0.0.1  新主機名

儲存後重新開機,然後就能正常啟動了

本文轉自 boy461205160 51CTO部落格,原文連結:http://blog.51cto.com/461205160/1760165