每当我执行命令时sudo apt upgrade
,它都会说:
following packages have unmet dependencies:
libpam-modules : PreDepends: libpam-modules-bin (= 1.3.1-5ubuntu4) but 1.3.1-5ubuntu4.1 is installed
Recommends: update-motd but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)
然后我执行命令时sudo apt --fix-broken install
出现以下错误:
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Could not exec dpkg!
E: Sub-process /usr/bin/dpkg returned an error code (100)
答案1
Aptitude
太棒了!它解决了很多这样的问题。
尝试使用它:sudo aptitude install <package-name>
。
或者
您甚至可以尝试sudo aptitude dist-upgrade
。
供参考- 这需要安装 aptitude。如果没有,请运行sudo apt-get install aptitude
。
祝你好运