安装源码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  新主机名
保存后重启,然后就能正常启动了


参考资料:http://www.lofter.com/tag/xampp


本文转自 boy461205160 51CTO博客,原文链接:http://blog.51cto.com/461205160/1760165


相关文章
|
6月前
|
安全 应用服务中间件 PHP
liunx执行pecl install swoole报错“failed to run `phpize‘”
liunx执行pecl install swoole报错“failed to run `phpize‘”
119 1
|
Ubuntu Linux 开发工具
Linux - ubuntu下Vim安装失败,报The following packages have unmet dependencies: vim : Depends: vim-common
Linux - ubuntu下Vim安装失败,报The following packages have unmet dependencies: vim : Depends: vim-common
594 0
|
Linux Shell PHP
|
XML 应用服务中间件 PHP
mac系统,php-fpm加入开机启动项
版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/80060551 ...
2076 0
|
Web App开发 网络安全 Apache