我删除了旧内核(使用dpkg -P),现在尝试安装的许多软件包都抱怨缺少作为依赖项的旧内核(已删除)
如果我按照建议执行“ apt-get install -f”,那么我的旧内核将被重新安装...。
sudo apt-get install synaptic
Reading package lists... Done
Building dependency tree
Reading state information... Done
synaptic is already the newest version (0.83).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-extra-4.10.0-28-generic : Depends: linux-image-4.10.0-28-generic but it is not going to be installed
linux-image-extra-4.10.0-35-generic : Depends: linux-image-4.10.0-35-generic but it is not going to be installed
linux-image-extra-4.10.0-37-generic : Depends: linux-image-4.10.0-37-generic but it is not going to be installed
linux-signed-image-4.10.0-35-generic : Depends: linux-image-4.10.0-35-generic (= 4.10.0-35.39~16.04.1) but it is not going to be installed
linux-signed-image-4.10.0-37-generic : Depends: linux-image-4.10.0-37-generic (= 4.10.0-37.41~16.04.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
如果程序包A(此处为linux-image-extra-***
和linux-signed-image-***
)依赖于程序包B(此处为linux-image-***
),则在未安装程序包B的情况下安装了程序包A是一个问题。有两种方法可以解决此问题:安装程序包B,或删除程序包A。
apt-get install -f
尝试做前者,但是在这里,很明显,您想要做的是删除不需要的程序包,所以就做吧™:
sudo apt remove linux-image-extra-4.10.0-28-generic linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic linux-signed-image-4.10.0-35-generic linux-signed-image-4.10.0-37-generic
是的,全部在一个命令中,而不是单独执行。将来,请始终使用Apt而不是删除软件包dpkg
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句