编译apache失败

今天在FreeBSD 8.0-RELEASE上编译httpd-2.2.4

 

在这里只粘贴一部分报错信息:

exports.c:1572: error: redefinition of `ap_hack_apr_allocator_create'
exports.c:177: error: `ap_hack_apr_allocator_create' previously defined here
exports.c:1573: error: redefinition of `ap_hack_apr_allocator_destroy'
exports.c:178: error: `ap_hack_apr_allocator_destroy' previously defined
here
exports.c:1574: error: redefinition of `ap_hack_apr_allocator_alloc'
exports.c:179: error: `ap_hack_apr_allocator_alloc' previously defined here
exports.c:1575: error: redefinition of `ap_hack_apr_allocator_free'
exports.c:180: error: `ap_hack_apr_allocator_free' previously defined here
exports.c:1576: error: redefinition of `ap_hack_apr_allocator_owner_set'
exports.c:181: error: `ap_hack_apr_allocator_owner_set' previously defined
here
exports.c:1577: error: redefinition of `ap_hack_apr_allocator_set_owner'
exports.c:182: error: `ap_hack_apr_allocator_set_owner' previously defined
here
exports.c:1578: error: redefinition of `ap_hack_apr_allocator_owner_get'
exports.c:183: error: `ap_hack_apr_allocator_owner_get' previously defined
here
exports.c:1579: error: redefinition of `ap_hack_apr_allocator_get_owner'
exports.c:184: error: `ap_hack_apr_allocator_get_owner' previously defined
here
exports.c:1580: error: redefinition of `ap_hack_apr_allocator_max_free_set'
exports.c:185: error: `ap_hack_apr_allocator_max_free_set' previously
defined here
exports.c:1581: error: redefinition of `ap_hack_apr_allocator_set_max_free'
exports.c:186: error: `ap_hack_apr_allocator_set_max_free' previously
defined here
exports.c:1583: error: redefinition of `ap_hack_apr_allocator_mutex_set'
exports.c:188: error: `ap_hack_apr_allocator_mutex_set' previously defined
here
exports.c:1584: error: redefinition of `ap_hack_apr_allocator_set_mutex'
exports.c:189: error: `ap_hack_apr_allocator_set_mutex' previously defined
here
exports.c:1585: error: redefinition of `ap_hack_apr_allocator_mutex_get'
exports.c:190: error: `ap_hack_apr_allocator_mutex_get' previously defined
here
exports.c:1586: error: redefinition of `ap_hack_apr_allocator_get_mutex'
exports.c:191: error: `ap_hack_apr_allocator_get_mutex' previously defined
here
exports.c:1593: error: redefinition of `ap_hack_apr_dso_load'
exports.c:198: error: `ap_hack_apr_dso_load' previously defined here
exports.c:1594: error: redefinition of `ap_hack_apr_dso_unload'
exports.c:199: error: `ap_hack_apr_dso_unload' previously defined here
exports.c:1595: error: redefinition of `ap_hack_apr_dso_sym'
exports.c:200: error: `ap_hack_apr_dso_sym' previously defined here
exports.c:1596: error: redefinition of `ap_hack_apr_dso_error'
exports.c:201: error: `ap_hack_apr_dso_error' previously defined here
exports.c:1602: error: redefinition of `ap_hack_apr_env_get'
exports.c:207: error: `ap_hack_apr_env_get' previously defined here
exports.c:1603: error: redefinition of `ap_hack_apr_env_set'
exports.c:208: error: `ap_hack_apr_env_set' previously defined here
exports.c:1604: error: redefinition of `ap_hack_apr_env_delete'
exports.c:209: error: `ap_hack_apr_env_delete' previously defined here
exports.c:1609: error: redefinition of `ap_hack_apr_strerror'
exports.c:214: error: `ap_hack_apr_strerror' previously defined here
exports.c:1614: error: redefinition of `ap_hack_apr_stat'
exports.c:219: error: `ap_hack_apr_stat' previously defined here
exports.c:1615: error: redefinition of `ap_hack_apr_lstat'
exports.c:220: error: `ap_hack_apr_lstat' previously defined here
exports.c:1616: error: redefinition of `ap_hack_apr_dir_open'
exports.c:221: error: `ap_hack_apr_dir_open' previously defined here
exports.c:1617: error: redefinition of `ap_hack_apr_dir_close'
exports.c:222: error: `ap_hack_apr_dir_close' previously defined here
exports.c:1618: error: redefinition of `ap_hack_apr_dir_read'
exports.c:223: error: `ap_hack_apr_dir_read' previously defined here
exports.c:1619: error: redefinition of `ap_hack_apr_dir_rewind'
exports.c:224: error: `ap_hack_apr_dir_rewind' previously defined here
exports.c:1620: error: redefinition of `ap_hack_apr_filepath_root'
exports.c:225: error: `ap_hack_apr_filepath_root' previously defined here

 

 

 

在网上查看了相关的帖子,大部分都是说符号链接的原因没太读懂是什么意思

 

我感觉应该跟apr和apr-util的安装有关系

 

在安装apache之前第一次我是这么安装apr和apr-util的:

 

#cd  /usr/ports/devel/apr
#make

# cd apr-1.3.8/
#./configure --prefix=/usr/local/apr

# make && make install

#cd ../ apr-util-1.3.9/

#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config --with-lib=/usr/local/apr/lib
#make && make install

 

 

重新安装之后:

apr-1.3.8]#./configure
apr-1.3.8]#make && make install
 apr-util-1.3.9]# ./configure --with-apr=/usr/local/apr/bin/apr-1-config --with-lib=/usr/local/apr/lib
 apr-util-1.3.9]# make && make install

 

看看这两次的安装有什么区别吗?

首次安装apr和apr-util的时候分别指定了安装路径,这样做是错误的,apr-util本身就是apr的一个插件,需要与apr安装到一起

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


你可能感兴趣的:(Apache)