当前位置: 技术问答>linux和unix
请教linux下安装编译apache出错的问题!
来源: 互联网 发布时间:2016-05-14
本文导语: 按照如下步骤我在我同事的机器上安装没有错误可正常完成安装,但是在我的机器上出现错误,请教是什么原因呢? 安装svn之前首先要安装apache,以下是我的安装步骤: 安装apr和apr-util http://apr.apache.org上面有这些...
按照如下步骤我在我同事的机器上安装没有错误可正常完成安装,但是在我的机器上出现错误,请教是什么原因呢?
安装svn之前首先要安装apache,以下是我的安装步骤:
安装apr和apr-util
http://apr.apache.org上面有这些源码包自己编译安装
tar xzvf apr-1.3.3.tar.gz
cd apr-1.3.3
./configure --prefix=/usr/local/apr
make
make install
tar xzvf apr-util-1.3.4.tar.gz
cd apr-util-1.3.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
接下来安装apache
cd httpd-2.2.11
./configure --prefix=/usr/local/apache2 --enable-so --enable-mods-shared=all --enable-cgi --enable-rewrite=share --enable-proxy=share --enable-proxy-ajp=share --enable-dav=share --enable-dav-fs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/bin
然后执行make,出错,错误信息如下:(我后来没管它直接安装svn提示我好像是apr util没装对或者找不到)
server/.libs/libmain.a(exports.o)(.data+0xd34): undefined reference to `apr_brigade_split_ex'
server/.libs/libmain.a(exports.o)(.data+0xe20): undefined reference to `apr_dbd_open_ex'
server/.libs/libmain.a(exports.o)(.data+0xe44): undefined reference to `apr_dbd_transaction_mode_get'
server/.libs/libmain.a(exports.o)(.data+0xe48): undefined reference to `apr_dbd_transaction_mode_set'
server/.libs/libmain.a(exports.o)(.data+0xe64): undefined reference to `apr_dbd_get_name'
server/.libs/libmain.a(exports.o)(.data+0xe84): undefined reference to `apr_dbd_pbquery'
server/.libs/libmain.a(exports.o)(.data+0xe88): undefined reference to `apr_dbd_pbselect'
server/.libs/libmain.a(exports.o)(.data+0xe8c): undefined reference to `apr_dbd_pvbquery'
server/.libs/libmain.a(exports.o)(.data+0xe90): undefined reference to `apr_dbd_pvbselect'
server/.libs/libmain.a(exports.o)(.data+0xe94): undefined reference to `apr_dbd_datum_get'
server/.libs/libmain.a(exports.o)(.data+0xf0c): undefined reference to `apr_memcache_hash'
server/.libs/libmain.a(exports.o)(.data+0xf10): undefined reference to `apr_memcache_hash_crc32'
server/.libs/libmain.a(exports.o)(.data+0xf14): undefined reference to `apr_memcache_hash_default'
server/.libs/libmain.a(exports.o)(.data+0xf18): undefined reference to `apr_memcache_find_server_hash'
server/.libs/libmain.a(exports.o)(.data+0xf1c): undefined reference to `apr_memcache_add_server'
server/.libs/libmain.a(exports.o)(.data+0xf20): undefined reference to `apr_memcache_find_server'
server/.libs/libmain.a(exports.o)(.data+0xf24): undefined reference to `apr_memcache_enable_server'
server/.libs/libmain.a(exports.o)(.data+0xf28): undefined reference to `apr_memcache_disable_server'
server/.libs/libmain.a(exports.o)(.data+0xf2c): undefined reference to `apr_memcache_server_create'
server/.libs/libmain.a(exports.o)(.data+0xf30): undefined reference to `apr_memcache_create'
server/.libs/libmain.a(exports.o)(.data+0xf34): undefined reference to `apr_memcache_getp'
server/.libs/libmain.a(exports.o)(.data+0xf38): undefined reference to `apr_memcache_set'
server/.libs/libmain.a(exports.o)(.data+0xf3c): undefined reference to `apr_memcache_add'
server/.libs/libmain.a(exports.o)(.data+0xf40): undefined reference to `apr_memcache_replace'
server/.libs/libmain.a(exports.o)(.data+0xf44): undefined reference to `apr_memcache_delete'
server/.libs/libmain.a(exports.o)(.data+0xf48): undefined reference to `apr_memcache_incr'
server/.libs/libmain.a(exports.o)(.data+0xf4c): undefined reference to `apr_memcache_decr'
server/.libs/libmain.a(exports.o)(.data+0xf50): undefined reference to `apr_memcache_version'
server/.libs/libmain.a(exports.o)(.data+0xf54): undefined reference to `apr_memcache_stats'
server/.libs/libmain.a(exports.o)(.data+0xf9c): undefined reference to `apr_reslist_acquired_count'
server/.libs/libmain.a(exports.o)(.data+0x1010): undefined reference to `apr_thread_pool_create'
server/.libs/libmain.a(exports.o)(.data+0x1014): undefined reference to `apr_thread_pool_destroy'
server/.libs/libmain.a(exports.o)(.data+0x1018): undefined reference to `apr_thread_pool_push'
server/.libs/libmain.a(exports.o)(.data+0x101c): undefined reference to `apr_thread_pool_schedule'
server/.libs/libmain.a(exports.o)(.data+0x1020): undefined reference to `apr_thread_pool_top'
server/.libs/libmain.a(exports.o)(.data+0x1024): undefined reference to `apr_thread_pool_tasks_cancel'
server/.libs/libmain.a(exports.o)(.data+0x1028): undefined reference to `apr_thread_pool_tasks_count'
server/.libs/libmain.a(exports.o)(.data+0x102c): undefined reference to `apr_thread_pool_scheduled_tasks_count'
server/.libs/libmain.a(exports.o)(.data+0x1030): undefined reference to `apr_thread_pool_threads_count'
server/.libs/libmain.a(exports.o)(.data+0x1034): undefined reference to `apr_thread_pool_busy_count'
server/.libs/libmain.a(exports.o)(.data+0x1038): undefined reference to `apr_thread_pool_idle_count'
server/.libs/libmain.a(exports.o)(.data+0x103c): undefined reference to `apr_thread_pool_idle_max_set'
server/.libs/libmain.a(exports.o)(.data+0x1040): undefined reference to `apr_thread_pool_idle_max_get'
server/.libs/libmain.a(exports.o)(.data+0x1044): undefined reference to `apr_thread_pool_thread_max_set'
server/.libs/libmain.a(exports.o)(.data+0x1048): undefined reference to `apr_thread_pool_thread_max_get'
server/.libs/libmain.a(exports.o)(.data+0x104c): undefined reference to `apr_thread_pool_threshold_set'
server/.libs/libmain.a(exports.o)(.data+0x1050): undefined reference to `apr_thread_pool_threshold_get'
server/.libs/libmain.a(exports.o)(.data+0x1054): undefined reference to `apr_thread_pool_task_owner_get'
安装svn之前首先要安装apache,以下是我的安装步骤:
安装apr和apr-util
http://apr.apache.org上面有这些源码包自己编译安装
tar xzvf apr-1.3.3.tar.gz
cd apr-1.3.3
./configure --prefix=/usr/local/apr
make
make install
tar xzvf apr-util-1.3.4.tar.gz
cd apr-util-1.3.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
接下来安装apache
cd httpd-2.2.11
./configure --prefix=/usr/local/apache2 --enable-so --enable-mods-shared=all --enable-cgi --enable-rewrite=share --enable-proxy=share --enable-proxy-ajp=share --enable-dav=share --enable-dav-fs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/bin
然后执行make,出错,错误信息如下:(我后来没管它直接安装svn提示我好像是apr util没装对或者找不到)
server/.libs/libmain.a(exports.o)(.data+0xd34): undefined reference to `apr_brigade_split_ex'
server/.libs/libmain.a(exports.o)(.data+0xe20): undefined reference to `apr_dbd_open_ex'
server/.libs/libmain.a(exports.o)(.data+0xe44): undefined reference to `apr_dbd_transaction_mode_get'
server/.libs/libmain.a(exports.o)(.data+0xe48): undefined reference to `apr_dbd_transaction_mode_set'
server/.libs/libmain.a(exports.o)(.data+0xe64): undefined reference to `apr_dbd_get_name'
server/.libs/libmain.a(exports.o)(.data+0xe84): undefined reference to `apr_dbd_pbquery'
server/.libs/libmain.a(exports.o)(.data+0xe88): undefined reference to `apr_dbd_pbselect'
server/.libs/libmain.a(exports.o)(.data+0xe8c): undefined reference to `apr_dbd_pvbquery'
server/.libs/libmain.a(exports.o)(.data+0xe90): undefined reference to `apr_dbd_pvbselect'
server/.libs/libmain.a(exports.o)(.data+0xe94): undefined reference to `apr_dbd_datum_get'
server/.libs/libmain.a(exports.o)(.data+0xf0c): undefined reference to `apr_memcache_hash'
server/.libs/libmain.a(exports.o)(.data+0xf10): undefined reference to `apr_memcache_hash_crc32'
server/.libs/libmain.a(exports.o)(.data+0xf14): undefined reference to `apr_memcache_hash_default'
server/.libs/libmain.a(exports.o)(.data+0xf18): undefined reference to `apr_memcache_find_server_hash'
server/.libs/libmain.a(exports.o)(.data+0xf1c): undefined reference to `apr_memcache_add_server'
server/.libs/libmain.a(exports.o)(.data+0xf20): undefined reference to `apr_memcache_find_server'
server/.libs/libmain.a(exports.o)(.data+0xf24): undefined reference to `apr_memcache_enable_server'
server/.libs/libmain.a(exports.o)(.data+0xf28): undefined reference to `apr_memcache_disable_server'
server/.libs/libmain.a(exports.o)(.data+0xf2c): undefined reference to `apr_memcache_server_create'
server/.libs/libmain.a(exports.o)(.data+0xf30): undefined reference to `apr_memcache_create'
server/.libs/libmain.a(exports.o)(.data+0xf34): undefined reference to `apr_memcache_getp'
server/.libs/libmain.a(exports.o)(.data+0xf38): undefined reference to `apr_memcache_set'
server/.libs/libmain.a(exports.o)(.data+0xf3c): undefined reference to `apr_memcache_add'
server/.libs/libmain.a(exports.o)(.data+0xf40): undefined reference to `apr_memcache_replace'
server/.libs/libmain.a(exports.o)(.data+0xf44): undefined reference to `apr_memcache_delete'
server/.libs/libmain.a(exports.o)(.data+0xf48): undefined reference to `apr_memcache_incr'
server/.libs/libmain.a(exports.o)(.data+0xf4c): undefined reference to `apr_memcache_decr'
server/.libs/libmain.a(exports.o)(.data+0xf50): undefined reference to `apr_memcache_version'
server/.libs/libmain.a(exports.o)(.data+0xf54): undefined reference to `apr_memcache_stats'
server/.libs/libmain.a(exports.o)(.data+0xf9c): undefined reference to `apr_reslist_acquired_count'
server/.libs/libmain.a(exports.o)(.data+0x1010): undefined reference to `apr_thread_pool_create'
server/.libs/libmain.a(exports.o)(.data+0x1014): undefined reference to `apr_thread_pool_destroy'
server/.libs/libmain.a(exports.o)(.data+0x1018): undefined reference to `apr_thread_pool_push'
server/.libs/libmain.a(exports.o)(.data+0x101c): undefined reference to `apr_thread_pool_schedule'
server/.libs/libmain.a(exports.o)(.data+0x1020): undefined reference to `apr_thread_pool_top'
server/.libs/libmain.a(exports.o)(.data+0x1024): undefined reference to `apr_thread_pool_tasks_cancel'
server/.libs/libmain.a(exports.o)(.data+0x1028): undefined reference to `apr_thread_pool_tasks_count'
server/.libs/libmain.a(exports.o)(.data+0x102c): undefined reference to `apr_thread_pool_scheduled_tasks_count'
server/.libs/libmain.a(exports.o)(.data+0x1030): undefined reference to `apr_thread_pool_threads_count'
server/.libs/libmain.a(exports.o)(.data+0x1034): undefined reference to `apr_thread_pool_busy_count'
server/.libs/libmain.a(exports.o)(.data+0x1038): undefined reference to `apr_thread_pool_idle_count'
server/.libs/libmain.a(exports.o)(.data+0x103c): undefined reference to `apr_thread_pool_idle_max_set'
server/.libs/libmain.a(exports.o)(.data+0x1040): undefined reference to `apr_thread_pool_idle_max_get'
server/.libs/libmain.a(exports.o)(.data+0x1044): undefined reference to `apr_thread_pool_thread_max_set'
server/.libs/libmain.a(exports.o)(.data+0x1048): undefined reference to `apr_thread_pool_thread_max_get'
server/.libs/libmain.a(exports.o)(.data+0x104c): undefined reference to `apr_thread_pool_threshold_set'
server/.libs/libmain.a(exports.o)(.data+0x1050): undefined reference to `apr_thread_pool_threshold_get'
server/.libs/libmain.a(exports.o)(.data+0x1054): undefined reference to `apr_thread_pool_task_owner_get'
|
运行
#./configure --help
看下,你写的那些参数是不是在里面有,或是没有。及库的路径。
一般是这些错了。
我的apache编译的参数。
# cat httpd-config.sh
#!/bin/bash
./configure --prefix=/usr/local/apache
--sysconfdir=/etc/httpd
--enable-cgi --enable-so --enable-ssl
--with-ssl=/usr/local/ssl --enable-track-vars
--enable-rewrite --with-zlib --enable-mods-shared=most
--enable-suexec --with-suexec-caller=daemon
--with-suexec-docroot=/var/www/
注意:我上面的这些扩展都有安装
#./configure --help
看下,你写的那些参数是不是在里面有,或是没有。及库的路径。
一般是这些错了。
我的apache编译的参数。
# cat httpd-config.sh
#!/bin/bash
./configure --prefix=/usr/local/apache
--sysconfdir=/etc/httpd
--enable-cgi --enable-so --enable-ssl
--with-ssl=/usr/local/ssl --enable-track-vars
--enable-rewrite --with-zlib --enable-mods-shared=most
--enable-suexec --with-suexec-caller=daemon
--with-suexec-docroot=/var/www/
注意:我上面的这些扩展都有安装
|
正解!