在 Ubuntu 16.04 上安装 mailutils 时出错

在 Ubuntu 16.04 上安装 mailutils 时出错

当我们尝试安装、删除、更新 mailutils 时,我们总是遇到相同的错误,状态为“半安装”。能帮帮我吗?输出:

sudo apt install mailutils

是:

Reading package lists... Done 
Building dependency tree        
Reading state information... Done 
mailutils is already the newest version (1:2.99.99-1ubuntu2). 
0 upgraded, 0 newly installed, 0 to remove and 136 not upgraded. 1 not fully installed or removed. 
Need to get 0 B/90.4 kB of archives. After this operation, 0 B of additional disk space will be used. 
Do you want to continue? [Y/n] y 
dpkg: error processing package patch (--configure):  package patch is not ready for configuration  cannot configure (current status 'half-installed') 
Errors were encountered while processing:  patch 
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

在这种情况下,我会尝试以下方法来尝试修复:
首先,尝试使用apt它自身来修复包。

sudo apt install -f

然后尝试重新安装该包:

sudo apt install --reinstall mailutils

如果失败,下一步是进入下一级apt,然后使用dpkg

sudo dpkg --configure -a

如果其他方法都失败了,请尝试使用 删除apt,然后重新安装:

sudo apt purge mailutils

并确保备份您想要保留的任何配置,以防万一。

如果这不起作用,请再试dpkg一次:

sudo dpkg --remove mailutils

其次是apt

sudo apt install mailutils

如果这不起作用,则可能是您的.deb缓存文件已损坏,或者依赖项已损坏,因此请运行:

sudo apt clean
sudo apt autoclean
sudo apt autoremove

然后重新开始所有步骤。

相关内容