编译apache时出错,“未定义的符号:未定义的符号:”_apr_dir_read$INODE64”......ld:未找到符号”

发布于 2024-09-30 00:45:23 字数 2290 浏览 7 评论 0原文

我正在尝试编译 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,但我想这应该不重要?

我已经为此苦苦挣扎了好几天,所以我希望有人能指出我正确的方向?

提前谢谢您!

问候, 尼克拉斯

I am trying to compile Apache. I did download the latest version of the sourcecode (2.2.17). This is what I do:

> sudo ./configure --prefix=/usr/local/apache2 --with-included-apr --enable-mods-shared=all --enable-module=so

> sudo make

and when doing that I get:

/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

What am I doing wrong?

I am using OSX but I guess that shouldn't matter?

I have been struggling with this for several days so I hope someone can point me in the rigth direction?

Thank you in advnace!

Regards,
Niklas

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

谷夏 2024-10-07 00:45:23

您正在尝试在 OSX 上构建吗?你安装了开发工具吗?

您的编译肯定失败了,这就是它不起作用的原因。您可能最好寻找预编译的包来完成您需要做的事情。至少你最好寻找在 OSX 上构建 apache 的指南。

Apache 还有一种方法可以使用名为 apxs2 的实用程序来编译安装您尝试添加的模块。 OSX 应该已经安装了 Apache,我无法想象他们不会在他们的构建中启用它。

当然,我不确定,但一个好的起点是 Google 在 OSX 上安装 mod_dbd

希望有帮助!

You're trying to build on OSX? Do you have the dev tools installed?

Your compile definitely failed which is why it's not working. You would probably be better off looking for precompiled packages to do what you need to do. At the very least you would be better off looking for guides to building apache on OSX.

Apache also has a way to compile install just the modules you're trying to add on using a utility called apxs2. OSX should have Apache installed already and I can't imagine they wouldn't have enabled that in their build.

Granted I don't know for sure but a good place to start would be to Google install mod_dbd on OSX

Hope that helps!

陪我终i 2024-10-07 00:45:23

我在 Mac OS X 上构建 httpd 2.4.2 时遇到了类似的问题,首先从这里下载最新的 APR http://apr .apache.org/ 然后编译并安装它在某个地方,然后像这样重新配置httpd

./configure --with-apr=/Users/youruser/where/you/installed/apr

I had a similar problem while building httpd 2.4.2 on Mac OS X, first download the latest APR from here http://apr.apache.org/ then compile and install it somewhere, then reconfigure httpd like this

./configure --with-apr=/Users/youruser/where/you/installed/apr
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文