宇风 发表于 2006-2-5 21:05:40

编译APACHE时出错

运行以下命令:
./configure --prefix=/usr/local/apache --enable-track-vars --enable-cgi --with-config-file-path=/usr/local/apache/conf
编译APACHE 2.0.54时出错

exports.c:2443: error: redefinition of 'ap_hack_apr_xml_parser_create'
exports.c:1081: error: previous definition of 'ap_hack_apr_xml_parser_create' was here
exports.c:2444: error: redefinition of 'ap_hack_apr_xml_parse_file'
exports.c:1082: error: previous definition of 'ap_hack_apr_xml_parse_file' was here
exports.c:2445: error: redefinition of 'ap_hack_apr_xml_parser_feed'
exports.c:1083: error: previous definition of 'ap_hack_apr_xml_parser_feed' was here
exports.c:2446: error: redefinition of 'ap_hack_apr_xml_parser_done'
exports.c:1084: error: previous definition of 'ap_hack_apr_xml_parser_done' was here
exports.c:2447: error: redefinition of 'ap_hack_apr_xml_parser_geterror'
exports.c:1085: error: previous definition of 'ap_hack_apr_xml_parser_geterror' was here
exports.c:2448: error: redefinition of 'ap_hack_apr_xml_to_text'
exports.c:1086: error: previous definition of 'ap_hack_apr_xml_to_text' was here
exports.c:2449: error: redefinition of 'ap_hack_apr_xml_empty_elem'
exports.c:1087: error: previous definition of 'ap_hack_apr_xml_empty_elem' was here
exports.c:2450: error: redefinition of 'ap_hack_apr_xml_quote_string'
exports.c:1088: error: previous definition of 'ap_hack_apr_xml_quote_string' was here
exports.c:2451: error: redefinition of 'ap_hack_apr_xml_quote_elem'
exports.c:1089: error: previous definition of 'ap_hack_apr_xml_quote_elem' was here
exports.c:2452: error: redefinition of 'ap_hack_apr_xml_insert_uri'
exports.c:1090: error: previous definition of 'ap_hack_apr_xml_insert_uri' was here
exports.c:2457: error: redefinition of 'ap_hack_apu_version'
exports.c:1095: error: previous definition of 'ap_hack_apu_version' was here
exports.c:2458: error: redefinition of 'ap_hack_apu_version_string'
exports.c:1096: error: previous definition of 'ap_hack_apu_version_string' was here
make: *** 错误1
make: Leaving directory `/usr/local/apache/server'
make: *** 错误1
make: Leaving directory `/usr/local/apache/server'
make: *** ´错误 1

月下刀客 发表于 2006-2-5 21:54:31

前面没有错误吗?

mandrakechina 发表于 2006-2-5 23:05:37

使用今年出的编译器编译前年的源代码,不出问题才怪呢。

zpqs 发表于 2006-9-18 13:21:50

mandrakechina 同学的回复是我看到的最垃圾的回复,不懂说清楚,我们都尊敬你,否则别再这里装明白。
可惜你的头衔咋作弊出来的?

zpqs 发表于 2006-9-18 13:48:20

还有,我气得忘记回复问题同学的解决方法了,这个问题由于你在编译apache前已经预装了apr,先将apr删除,然后再重新配置编译(为什么这样做呢?由于2.0.x和2.2.x有本质上的apr需求区别,也是版本变更之一,具体可以看apache.org中的具体说明)。
如果是2.2.x则需要进入srclib目录下编译自带的apr和apr-util,然后再编译apache。
注意的是 在参数上一定要指定路径 --with-apr=/路径/apr --with-apr-util=/路径/apr-util
页: [1]
查看完整版本: 编译APACHE时出错