按照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.