我找不到 sendmail 的可执行文件?

我找不到 sendmail 的可执行文件?

我在 ubuntu14.04lts Amazon EC2 中对 Sendmail 8.14.4 和 BerkeleyDB.4.1 进行了源安装。据我所知,安装已成功编译。随着源的安装,我使用命令复制到/usr/sbin/sendmail新版本。sendmailcp

但我找不到该sendmail文件(请参阅下面)。没有可执行文件..

root@ip-192-168-10-152:/usr/local/sendmail/sendmail-8.14.4/obj.Linux.3.13.0-24-generic.x86_64/sendmail# ll sendmail*

lrwxrwxrwx 1 root root 25 Jun 30 08:15 sendmail.0.dist -> ../../sendmail/sendmail.0    
lrwxrwxrwx 1 root root 25 Jun 30 08:15 sendmail.8 -> ../../sendmail/sendmail.8    
lrwxrwxrwx 1 root root 25 Jun 30 08:15 sendmail.h -> ../../sendmail/sendmail.h

是不是编译不正确?为什么?

==========The environment set at compile ==============

root@ip-192-168-10-152:/usr/local/sendmail/sendmail-8.14.4/devtools/Site# cat site.config.m4

APPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB.4.1/include')    
APPENDDEF(`confLIBDIRS', `-L/usr/local/BerkeleyDB.4.1/lib')    
APPENDDEF(`confLIBS', `-ldb -lpthread')

==========================================================

编辑#1

我假设所有二进制文件都已成功编译,除了 sendmail 二进制文件。

root@ip-192-168-10-172:/usr/local/sendmail/sendmail-8.14.9/sendmail# ./makesendmail

Configuration: pfx=, os=Linux, rel=3.2.0-58-virtual, rbase=3, rroot=3.2, arch=x86_64, sfx=, variant=optimized
Making in /usr/local/sendmail/sendmail-8.14.9/obj.Linux.3.2.0-58-virtual.x86_64/sendmail
cc -o sendmail  -L/usr/local/BerkeleyDB.4.1/lib main.o alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o map.o mci.o milter.o mime.o parseaddr.o queue.o ratectrl.o readcf.o recipient.o sasl.o savemail.o sfsasl.o shmticklib.o sm_resolve.o srvrsmtp.o stab.o stats.o sysexits.o timers.o tls.o trace.o udb.o usersmtp.o util.o version.o      /usr/local/sendmail/sendmail-8.14.9/obj.Linux.3.2.0-58-virtual.x86_64/libsmutil/libsmutil.a /usr/local/sendmail/sendmail-8.14.9/obj.Linux.3.2.0-58-virtual.x86_64/libsm/libsm.a  -ldb -ldl -ldb -lpthread

domain.o: In function `getmxrr':    
domain.c:(.text+0x1f0): undefined reference to `__res_search'    
domain.c:(.text+0x200): undefined reference to `__res_query'    
domain.c:(.text+0x2a5): undefined reference to `__dn_skipname'    
domain.c:(.text+0x4f4): undefined reference to `__dn_expand'    
domain.c:(.text+0x5be): undefined reference to `__dn_expand'    
domain.o: In function `dns_getcanonname':    
domain.c:(.text+0x1017): undefined reference to `__res_querydomain'    
domain.c:(.text+0x10ab): undefined reference to `__dn_skipname'    
domain.c:(.text+0x1213): undefined reference to `__dn_expand'    
domain.c:(.text+0x12a1): undefined reference to `__dn_expand'    
sm_resolve.o: In function `dns_lookup_int':    
sm_resolve.c:(.text+0x21d): undefined reference to `__res_search'    
sm_resolve.c:(.text+0x313): undefined reference to `__dn_expand'    
sm_resolve.c:(.text+0x42e): undefined reference to `__dn_expand'    
sm_resolve.c:(.text+0x598): undefined reference to `__dn_expand'    
sm_resolve.c:(.text+0x6d8): undefined reference to `__dn_expand'    
sm_resolve.c:(.text+0x799): undefined reference to `__dn_expand'    
sm_resolve.c:(.text+0x99f): undefined reference to `__res_search'    
collect2: ld returned 1 exit status    
make: *** [sendmail] Error 1

答案1

make我会仔细检查构建时的输出是否有警告或错误。如果没有sendmail当前的二进制文件,则它无法正确构建。还要在源代码树中查找sendmail使用。find通常,二进制文件会被放入不同的目录中。

$ find . -type f | grep sendmail$

编译问题

根据您最新的编辑,这两行告诉您编译失败。

collect2: ld returned 1 exit status    
make: *** [sendmail] Error 1

您需要先弄清楚为什么会发生这些错误,然后才能担心找到生成的二进制文件sendmail.您找不到它,因为它还不存在。

相关内容