![由于某个程序的依赖关系未得到满足,因此无法安装所有更新](https://linux22.com/image/943788/%E7%94%B1%E4%BA%8E%E6%9F%90%E4%B8%AA%E7%A8%8B%E5%BA%8F%E7%9A%84%E4%BE%9D%E8%B5%96%E5%85%B3%E7%B3%BB%E6%9C%AA%E5%BE%97%E5%88%B0%E6%BB%A1%E8%B6%B3%EF%BC%8C%E5%9B%A0%E6%AD%A4%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%E6%89%80%E6%9C%89%E6%9B%B4%E6%96%B0.png)
我大约 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
并继续使用该系统。