从 Ubuntu 14.04 LTS 服务器中删除 mailman

从 Ubuntu 14.04 LTS 服务器中删除 mailman

我使用 webmin 来配置服务器,并运行更新和升级软件包。它首先使用命令,apt-get update然后使用apt-get -y -f upgrade命令。

昨天我尝试升级项目(例如 bind9 等),但突然它似乎停止了升级。出于某种原因,它尝试在我的服务器上安装 mailman,但无法完成。超过 15 分钟后它仍然没有安装。因此,我中止了升级/安装然后重启服务器并重试。但又等了很长时间,mailman 根本无法安装。

现在我想从我的服务器上删除 mailman。但要删除它,我必须先完成 mailman 的安装,它说,然后我才能删除它。但安装和删除似乎都不起作用。

我尝试用这个命令:

apt-get remove mailman -y

Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  mailman
0 upgraded, 0 newly installed, 1 to remove and 12 not upgraded.
1 not fully installed or removed.
After this operation, 36.2 MB disk space will be freed.
dpkg: error processing package mailman (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
Errors were encountered while processing:
 mailman
E: Sub-process /usr/bin/dpkg returned an error code (1)

我甚至尝试了下面的命令,但它也无法被删除:

apt-get remove --purge mailman -y

Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  mailman*
0 upgraded, 0 newly installed, 1 to remove and 12 not upgraded.
1 not fully installed or removed.
After this operation, 36.2 MB disk space will be freed.
dpkg: error processing package mailman (--purge):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
Errors were encountered while processing:
 mailman
E: Sub-process /usr/bin/dpkg returned an error code (1)

有人能帮我删除 mailman 吗?或者,如果不可能的话,我该如何跳过mailman-升级/安装,以便可以进行其他升级。

谢谢,凯文

答案1

我能够通过运行以下命令在我的 virtualmin 服务器上修复此问题:

$ sudo /etc/init.d/mailman start
$ sudo apt-get upgrade

相关内容