Ubuntu 16.04 命令行 sendmail 安装挂了

Sis*_*sir 51 apt sendmail

我试图安装 sendmail 但它在尝试生成 ssl 证书时挂起。我取消了安装过程,后来杀死了锁定任何新软件包无法安装的进程。

但是每当我运行apt-get install <package_name>它时,它都会返回到 sendmail 安装并尝试安装 ssl 证书。

我已经重新启动系统,但问题仍然存在。

我该如何解决?

命令行信息

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.
Run Code Online (Sandbox Code Playgroud)

可以在这里找到类似的问题但没有解决方案。OP 刚刚更改了操作系统。

Sim*_*mon 119

我也刚遇到这个问题。它似乎挂在这个脚本的第 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
Run Code Online (Sandbox Code Playgroud)

它现在应该安装。

  • 这有效,谢谢。一方面说明:如果 dpkg 由于安装挂起而被锁定,则您需要先终止 update_sendmail pid。[ps -A | grep update_sendmail] 在运行 dpkg --configure -a 之前。 (18认同)
  • 在杀死卡住的 dpkg 处理并运行 dpkg --configure -a 后,它现在挂在“正在更新 /etc/mail/aliases...” (8认同)
  • 我收到此错误:`警告:未找到 3 个数据库源,(但已创建)请调查。` 我应该担心吗? (6认同)
  • 哦,等等,现在真的很好。只是花了一些时间来做它的事情 (5认同)
  • 也适用于 Ubuntu 14.04 (5认同)
  • 这有效,但可能是包应该被修复。 (2认同)
  • 对问题是什么以及命令如何尝试解决它的一些解释会很棒。 (2认同)