我正在尝试编译 Apache。我确实下载了最新版本的源代码(2.2.17)。这就是我所做的:
> sudo ./configure --prefix=/usr/local/apache2 --with-included-apr --enable-mods-shared=all --enable-module=so
> sudo make
当这样做时,我得到:
/Users/Niklas/Development/apache/httpd-2.2.17/srclib/apr/libtool --silent --mode=link gcc -g -O2 -o httpd modules.lo buildmark.o -export-dynamic server/libmain.la modules/http/libmod_http.la modules/mappers/libmod_so.la server/mpm/prefork/libprefork.la os/unix/libos.la /Users/Niklas/Development/apache/httpd-2.2.17/srclib/pcre/libpcre.la /Users/Niklas/Development/apache/httpd-2.2.17/srclib/apr-util/libaprutil-1.la -lexpat -liconv /Users/Niklas/Development/apache/httpd-2.2.17/srclib/apr/libapr-1.la -lpthread
Undefined symbols:
"_apr_dir_read$INODE64", referenced from:
_process_resource_config_nofnmatch in libmain.a(config.o)
_ap_process_resource_config in libmain.a(config.o)
"_apr_file_info_get$INODE64", referenced from:
_ap_pcfg_openfile in libmain.a(util.o)
"_apr_dir_open$INODE64", referenced from:
_process_resource_config_nofnmatch in libmain.a(config.o)
_ap_process_resource_config in libmain.a(config.o)
"_apr_stat$INODE64", referenced from:
_ap_process_resource_config in libmain.a(config.o)
_ap_mpm_set_coredumpdir in libmain.a(mpm_common.o)
_ap_is_directory in libmain.a(util.o)
_ap_is_rdirectory in libmain.a(util.o)
_ap_log_pid in libmain.a(log.o)
_unixd_pre_config in libos.a(unixd.o)
_resolve_symlink in libmain.a(request.o)
_resolve_symlink in libmain.a(request.o)
_resolve_symlink in libmain.a(request.o)
_ap_directory_walk in libmain.a(request.o)
_ap_directory_walk in libmain.a(request.o)
_ap_directory_walk in libmain.a(request.o)
_ap_sub_req_lookup_dirent in libmain.a(request.o)
_ap_sub_req_lookup_dirent in libmain.a(request.o)
_ap_sub_req_lookup_file in libmain.a(request.o)
_ap_sub_req_lookup_file in libmain.a(request.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make: *** [all-recursive] Error 1
我究竟做错了什么?
我正在使用 OSX,但我想这不重要吗?
我已经为此苦苦挣扎了好几天,所以我希望有人能指出我正确的方向吗?
提前谢谢你!
问候, 尼克拉斯