【发布时间】:2012-08-08 12:47:32
【问题描述】:
我刚刚从源代码在 Ubuntu 服务器中安装了 postfix 2.7.11。我不使用 ubuntu 自己的,因为我需要旧版本。
我发现了一个非常有趣的问题。以前,在 CentOS 5 和 6 中,我都可以毫无问题地构建源代码。但是,在 Ubuntu 服务器 12.04 中是完全不同的。
我遇到了以下问题:
dict_nis.c:173: error: undefined reference to 'yp_match'<br>
dict_nis.c:187: error: undefined reference to 'yp_match'<br>
dns_lookup.c:347: error: undefined reference to '__dn_expand'<br>
dns_lookup.c:218: error: undefined reference to '__res_search'<br>
dns_lookup.c:287: error: undefined reference to '__dn_expand'<br>
dns_lookup.c:498: error: undefined reference to '__dn_expand'<br>
dns_lookup.c:383: error: undefined reference to '__dn_expand'<br>
是的,这个原因很明显。我只是搜索相关库并将其添加到 makefile 中。有用。
问题是为什么? Ubuntu Server 和 CentOS 有什么区别?
一种可能是 gcc 和 ld 版本。 Ubuntu 服务器在 CentOS 中使用不同版本的 gcc 和 ld。但我不确定。
【问题讨论】:
-
IIRC 后缀是基于
autoconf的,所以如果您可以发布config.log,或者先自己查看一下,您就会明白为什么它无法检测到所需的库。 -
嗨@favoretti 我找不到config.log,你能告诉我如何找到它吗?我应该提到的一件事是,当我从源代码安装 postfix 时,我不需要在 make 之前运行 ./configure。其实我可以直接运行make。
标签: ubuntu postfix-mta ubuntu-12.04