在 16.04 上从 Synaptic 和命令行安装时出错

在 16.04 上从 Synaptic 和命令行安装时出错

我使用 Ubuntu 电子邮件中推荐的命令行步骤安装了 Gnome 3.20 升级。此安装导致报告的失败,但系统现在报告 Gnome 3.20 级别。从那时起,命令行和 Synaptic 包管理器都返回此错误。软件安装从未起作用,由于我已经在 12.04 和 14.04 上使用过 Synaptic,所以我忽略了它。(它仍然不起作用)我追踪了它返回的错误消息,它们如下:

Job for amavis.service failed because the control process exited with error code. See "systemctl status amavis.service" and "journalctl -xe" for details.
invoke-rc.d: initscript amavis, action "start" failed.
dpkg: error processing package amavisd-new (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up bleachbit (1.10-1) ...
Errors were encountered while processing:
 amavisd-new
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up amavisd-new (1:2.10.1-2ubuntu1) ...
Creating/updating amavis user account...
Job for amavis.service failed because the control process exited with error code. See "systemctl status amavis.service" and "journalctl -xe" for details.
invoke-rc.d: initscript amavis, action "start" failed.
dpkg: error processing package amavisd-new (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 amavisd-new

=>"systemctl status amavis.service" returned:

● amavis.service - LSB: Starts amavisd-new mailfilter
   Loaded: loaded (/etc/init.d/amavis; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2016-08-25 09:32:19 PDT; 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 8672 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)

Aug 25 09:32:19 dsd-Aspire-7250 amavis[8672]:   The value of variable $myhostname is "dsd-Aspire-7250", but should have been
Aug 25 09:32:19 dsd-Aspire-7250 amavis[8672]:   a fully qualified domain name; perhaps uname(3) did not provide such.
Aug 25 09:32:19 dsd-Aspire-7250 amavis[8672]:   You must explicitly assign a FQDN of this host to variable $myhostname
Aug 25 09:32:19 dsd-Aspire-7250 amavis[8672]:   in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's
Aug 25 09:32:19 dsd-Aspire-7250 amavis[8672]:   network name!
Aug 25 09:32:19 dsd-Aspire-7250 amavis[8672]: (failed).
Aug 25 09:32:19 dsd-Aspire-7250 systemd[1]: amavis.service: Control process exited, code=exited status=1
Aug 25 09:32:19 dsd-Aspire-7250 systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
Aug 25 09:32:19 dsd-Aspire-7250 systemd[1]: amavis.service: Unit entered failed state.
Aug 25 09:32:19 dsd-Aspire-7250 systemd[1]: amavis.service: Failed with result 'exit-code'.
~
~
=>"journalctl -xe"returned:

Aug 25 09:43:05 dsd-Aspire-7250 .My-Weather-Indicator.desktop[7292]: --- Updating data in location 0 ---
Aug 25 09:43:05 dsd-Aspire-7250 .My-Weather-Indicator.desktop[7292]: ****** Updating weather
Aug 25 09:43:05 dsd-Aspire-7250 .My-Weather-Indicator.desktop[7292]: ****** Calculating rawOffset
Aug 25 09:43:05 dsd-Aspire-7250 .My-Weather-Indicator.desktop[7292]: Bug #1568774 Can't connect to HTTPS URL because the SSL module is 
Aug 25 09:43:05 dsd-Aspire-7250 .My-Weather-Indicator.desktop[7292]: ****** Updated weather
Aug 25 09:43:05 dsd-Aspire-7250 .My-Weather-Indicator.desktop[7292]: {'current_conditions': {'precip_today': None, 'dawn_time': '05:31'
Aug 25 09:43:05 dsd-Aspire-7250 .My-Weather-Indicator.desktop[7292]: : None, 'moon_icon': 'mwi-moon22.png', 'avehumidity': None, 'condi
Aug 25 09:43:11 dsd-Aspire-7250 nemo-autostart.desktop[7309]: (nemo:7309): Gtk-WARNING **: Allocating size to GtkGrid 0x1a39ae0 without
Aug 25 09:43:34 dsd-Aspire-7250 systemd[2997]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Aug 25 09:43:34 dsd-Aspire-7250 systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Aug 25 09:43:34 dsd-Aspire-7250 systemd[1]: apt-daily.timer: Adding 10h 40min 22.323453s random time.
Aug 25 09:43:34 dsd-Aspire-7250 systemd[1]: snapd.refresh.timer: Adding 5h 8min 7.468582s random time.
Aug 25 09:43:34 dsd-Aspire-7250 systemd-timesyncd[1284]: Synchronized to time server 91.189.91.157:123 (ntp.ubuntu.com).
lines 1573-1595/1595 (END)

还有一点需要注意:安装后所有软件似乎都能正常工作,但我仍然收到错误消息。

答案1

上面的答案有点令人困惑,我花了很长时间才弄清楚它的意思。根据@Tsakiroglou 的回答,您可以编辑文件

/etc/amavis/conf.d/05-node_id

最后,有一行被注释掉了:

\# $myhostname = mail.example.com

取消注释此行并直接指向 Postfix 正在监听的 FQDN。

答案2

我回来了,面前有一台像样的电脑,可以发布正常结构的答案。请允许我发布帖子以备将来提供帮助。

首先,必须清除 Synaptic 软件包管理器或 apt。每次软件包损坏时,您都必须清除 apt 管理器,在这里您必须使用 $sudo apt remove amavisd-new 进行清除。这确实是一种方法。要删除 amavis,请选择合适的 (fqdn) 主机名并重新安装。

第二种方法也是最简单的方法就是不要删除软件包来解决这个问题。编辑 /etc/amavis/conf.d/05-node_id。

sudo nano /etc/amavis/conf.d/05-node_id

如果你没有 nano ,请使用其他编辑器。找到行 #$myhostname 删除 # 取消注释该行,然后更改为$myhostname = ubuntuServe.example.com//ubuntuServer 是你在 $hostname 命令后获得的主机名。重新启动 Amavisd

sudo systemctl restart amavis.service

它应该可以工作。

PS:我在尝试在 ubuntu 服务器安装中的邮件服务器 (postfix) 上设置 amavisd-new 包时遇到了这种情况。在这种情况下,在 gnome 升级后整个情况就变得一团糟,明智的做法是删除该包并在更新后重新安装。请接受我之前混乱的回答的道歉。

相关内容