Centos5编译安装apache报错处理

因为编译安装的问题,在思考yum安装是非常便利,但是是否因此导致很多软件的功能装不全呢,是否yum的功能我还会得不够呢?


最近在学习apache方面的东西,在centos5.10上编译安装apache2.2.27,configure这一步问题蛮多,都是出在一些软件包没有装的问题上。

1.configure的命令如下:

/configure --prefix=/etc/httpd --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so \
--with-mpm=worker --enable-rewrite,执行几次都没有成功,报错比较多,只能一样一样的解决。


2.编译的模块比较多,configure的过程出现的东西非常多,用xshell记录下日志。

# more /tmp/hpce/1.log
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring APR library
Platform: x86_64-unknown-linux-gnu
checking for working mkdir -p... yes

报错 x86_64-unknown-linux-gnu我开始还是比较担心会不会是因为不兼容64位的系统导致的,不过不算主要的问题,观察日志,另外一个比较明显的问题是C compiler很多报错,就估计是gcc相关的包都没装。

3.yum安装相关的包yum install gcc.x86_64 -y

yum install sqlite-devel -y

yum install gcc-c++ libstdc++-devel -y

安装了这些包后,执行./configure编译会报一个mod_deflate相关的错误,configure: error: mod_deflate has been requested but can not be built due to prerequisite failures,搜索了一下,有网友提醒需要安 zlib-devel工具,尝试

yum install  zlib-devel -y后再次尝试./configure,这次顺利通过了,后面执行make和make install都没啥要说的,问题解决。

<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(987) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~
评论热议
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值