apt-删除未配置的包

apt-删除未配置的包

我有一个 Linux-Mint Debian 版本系统。当我安装 sendmail 时,我遇到了无限循环。

Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/databases...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/databases...

当我尝试 dpkg --configure -a 时,结果是一样的。

现在我想简单地从安装队列中删除 sendmail - 但我不能简单地这样做,因为 apt-get 总是想先配置 sendmail。

有没有办法强制 apt-get 删除 sendmail 或将其设置为“已配置” - 即使该包没有正确配置?

答案1

这是一个错误并且已登录http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717951

他们已经修复了这个错误,但如果你现在陷入了无限循环,这对你没有多大帮助。在对这个错误的回应中,用户 Flo 发布了一种解决方法,即更改 update_db 文件,这对我来说很有效:

    $diff update_db update_db.orig 
479,480c479,482
<               str=$(echo "$line" | head -n 1);
<               line=$(echo "$line" | tail -n +2);
---
>               str=$(echo "$line" | cut -d -f 1);
>               line=$(echo "$line" | cut -d -f 2-);

相关内容