阅读内容

SUSE EL下编译Apache

[日期:2007-09-07] 来源:Linux公社  作者:Linuxidc


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的接口。

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”即可。



本文评论       全部评论
发表评论
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款


点评: 字数
姓名:

L
I
N
U
X


GOOGLE搜索
Google