![Ubuntu 16.04 命令行 sendmail 安装挂了](https://linux22.com/image/894854/Ubuntu%2016.04%20%E5%91%BD%E4%BB%A4%E8%A1%8C%20sendmail%20%E5%AE%89%E8%A3%85%E6%8C%82%E4%BA%86.png)
我尝试安装 sendmail,但在尝试生成 ssl 证书时它挂起了。我已取消安装过程,随后终止了锁定任何新软件包安装的进程。
但每当我运行它时,apt-get install <package_name>
它都会返回到 sendmail 安装并尝试安装 ssl 证书。
我已重新启动系统但问题仍然存在。
我该如何解决这个问题?
CLI 信息
sudo dpkg --configure -a
Setting up sendmail-bin (8.15.2-3) ...
Updating sendmail environment ...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Writing configuration to /etc/mail/sendmail.conf.
Writing /etc/cron.d/sendmail.
Disabling HOST statistics file(/var/lib/sendmail/host_status).
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Writing configuration to /etc/mail/sendmail.conf.
Writing /etc/cron.d/sendmail.
Could not open /etc/mail/databases(No such file or directory), creating it.
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/databases...
Checking filesystem, this may take some time - it will not hang!
... Done.
Checking for installed MDAs...
sasl2-bin not installed, not configuring sendmail support.
To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth"
Creating/Updating SSL(for TLS) information
Creating /etc/mail/tls/starttls.m4...
Creating SSL certificates for sendmail.
类似的问题可以在这里找到但没有解决方案。楼主只是更改了操作系统。
答案1
我刚刚也遇到了这个问题。它似乎挂在这个脚本的第 240 行/usr/share/sendmail/update_tls
。
为了解决这个问题,我执行了以下命令:
cd /etc/mail/tls
sudo openssl dsaparam -out sendmail-common.prm 2048
sudo chown root:smmsp sendmail-common.prm
sudo chmod 0640 sendmail-common.prm
sudo dpkg --configure -a
现在就可以安装了。