SUSE EL 9 下编译Apache2

SUSE EL 9
httpd-2.2.4

1
先将系统安装时安装的APACHE2卸载掉
rpm -e apache2
然后会提示很多依赖需要先卸载,再一一先卸载后即可卸载完
出现两个相互依赖的则需要使用
rpm -e apache2 --nodeps

2
#tar -zxvf httpd-2.2.4.tar.gz
#cd httpd-2.2.4
#./configure --prefix=/opt/app/apache-2.2.2 \
--enable-ssl --enable-so --disable-info \
--enable-shared=max --enable-module=most \
--enable-expires --enable-headers \
--enable-rewrite
配置时报错:“cannot use an external APR with the bundled APR-util”
解决方法:
APR了,这个东西是Apache可移植运行库,源自为了服务器代码的多
平台性, 尝试将不同的操作系统特定字节与操作系统无关代码隔离。结果就提供了一
个基础API的接口。具体作用大家可参考
http://fanqiang.chinaunix.net/app/web/2006-02-21/4012.shtml文章。
apache-2.2.0提供了apr以及apr-util的源代码 
要使用发行源代码中自带的apr/apr-util源代码进行安装,你必须手动完成:  
我们先编译和安装 apr 1.2 
# tar xzvf httpd -2.2.0.tar.gz 
# cd httpd-2.2.0 
# cd srclib/apr 
# ./configure --prefix=/usr/local/apr 
# make 
# make install 
现在编译和安装 apr-util 1.2 
# cd ../apr-util 
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/ 
# make 
# make install  

重复上面的./configure 报错:
exports.c:1653: error: redefinition of 'ap_hack_apr_version_string'
exports
.c:1022: error: previous definition of 'ap_hack_apr_version_string' was here
make[
2]: *** [exports.lo] Error 1
make[
2]: Leaving directory `/usr/local/src/httpd-2.2.4/server'
make[
1]: *** [all-recursive] Error 1
make[
1]: Leaving directory `/usr/local/src/httpd-2.2.4/server'
make: *** [all-recursive] Error 
1
解决办法:
在configure后加上 “--with-included-apr”即可

编译通过


转载于:https://www.cnblogs.com/wanlang/archive/2007/09/03/879822.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值