源码安装sendmail出错解决方法

按照sendmail的安装说明安装,完了以后没有sendmail主程序的可执行文件。退回到terminal查看编译记录,发现隐藏的很深的几行错误信息:

domain.c:(.text+0x258): undefined reference to `__res_querydomain'
domain.c:(.text+0x2d0): undefined reference to `__dn_skipname'
domain.c:(.text+0x4ac): undefined reference to `__dn_expand'
domain.c:(.text+0x53e): undefined reference to `__dn_expand'
domain.o: In function `getmxrr':
domain.c:(.text+0xbfc): undefined reference to `__res_search'
domain.c:(.text+0xc7a): undefined reference to `__dn_skipname'
domain.c:(.text+0xc8f): undefined reference to `__res_query'
domain.c:(.text+0xfdf): undefined reference to `__dn_expand'
domain.c:(.text+0x1165): undefined reference to `__dn_expand'
sm_resolve.o: In function `dns_lookup_int':
sm_resolve.c:(.text+0x18f): undefined reference to `__res_search'
sm_resolve.c:(.text+0x30e): undefined reference to `__dn_expand'
sm_resolve.c:(.text+0x3a6): undefined reference to `__dn_expand'
sm_resolve.c:(.text+0x55f): undefined reference to `__dn_expand'
sm_resolve.c:(.text+0x606): undefined reference to `__dn_expand'
sm_resolve.c:(.text+0x6d4): undefined reference to `__dn_expand'
collect2: ld returned 1 exit status
make: *** [sendmail] Error 1


谷歌了下,找到了解决方案(原帖地址):

The above error is usually found when the sendmail compilation does not find the resolv.h header file. The text of the error is attached below. This file provides the routine known as res_query. So we have to force the sendmail installation to rather take the system resolver routine which may not be installed in the path /usr/include. To do so we just need to modify the variable "LIBS" in Makefile which is under the sendmail object directory. A pattern "-lresolv" has to be appended to the line containing "LIBS" variable. 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值