我有一个卡住包系统,因为问题是试图清除/boot,以便更新将发生。现在我正处在这样一个时刻:
sudo apt-get -f install失败,因为它试图安装一个软件包,这将导致/boot磁盘完全错误。试图删除包不起作用:
sudo apt-get --force-yes remove linux-image-extra-4.4.0-119-generic linux-image-extra-4.4.0-97-generic linux-signed-image-4.4.0-119-generic linux-signed-image-4.4.0-97-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-generic : Depends: linux-image-4.4.0-119-generic but it is not going to be installed
Depends: linux-image-extra-4.4.0-119-generic but it is not going to be installed
linux-signed-image-generic : Depends: linux-signed-image-4.4.0-119-generic but it is not going to be installed
Depends: linux-image-extra-4.4.0-119-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).有什么建议吗?
发布于 2018-04-20 22:07:35
似乎您没有足够的空间为新的Linux内核,所以您必须删除旧的内核。
首先,运行以下命令:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'这将向您展示哪些包将被移除。确保当前内核版本不在该列表中。运行uname -a以查看内核版本是什么。
接下来,运行以下命令,使用dpkg --remove删除每个命令。您还可以在dpkg --remove命令之前复制第一节中的名称。
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs dpkg --remove最后,您将能够运行sudo apt-get -f install。
https://askubuntu.com/questions/1026802
复制相似问题