由于某个程序的依赖关系未得到满足,因此无法安装所有更新

由于某个程序的依赖关系未得到满足,因此无法安装所有更新

我大约 6 个月没有碰过我的 Ubuntu Mate 机器了。当我清理它时,我发现它有一个长达一英里的更新列表。但它不允许我安装它们,因为一个程序“cqrlog”有未满足的依赖关系。 sudo apt-get upgrade返回:

...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-fhTCNR/00-cqrlog_2.4.0-3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

但是我不再需要该程序了,sudo apt-get purge cqrlog并且sudo apt-get purge cqrlog-data都返回


    dpkg: error processing package cqrlog (--remove):
     package is in a very bad inconsistent state; you should
     reinstall it before attempting a removal
    dpkg: too many errors, stopping
    Errors were encountered while processing:
     cqrlog
    Processing was halted because there were too many errors.
    E: Sub-process /usr/bin/dpkg returned an error code (1)

然后我尝试了一下,sudo apt-get reinstall cqrlog结果返回:


    ...
    dpkg: warning: old cqrlog package post-removal script subprocess returned error exit status 1
    dpkg: trying script from the new package instead ...
    dpkg: error processing archive /var/cache/apt/archives/cqrlog_2.4.0-3_amd64.deb (--unpack):
     new cqrlog package post-removal script subprocess returned error exit status 1
    dpkg: error while cleaning up:
     new cqrlog package post-removal script subprocess returned error exit status 1
    Errors were encountered while processing:
     /var/cache/apt/archives/cqrlog_2.4.0-3_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

因此,在我放弃并再次更换发行版之前,如果您能提供任何帮助,我将不胜感激。谢谢。

答案1

在这种情况下,你应该使用以下方式请求 APT 删除低级软件包

sudo dpkg --purge --force-all cqrlog-data
sudo dpkg --purge --force-all cqrlog

然后检查新的软件列表,安装所有更新

sudo apt-get update # add any error output to the question
sudo apt-get dist-upgrade
sudo apt-get install -f
sudo dpkg --configure -a

并继续使用该系统。

相关内容