由于 /boot 分区中可用空间不足,我在安装最新内核时遇到了问题。最后,我设法强制删除旧内核文件,但当我尝试 sudo apt-get -f install 时,它安装了所有以前的内核,其中一个无法完成安装,因为它再次填满了整个 /boot 分区。我再次删除了内核,现在我遇到了大多数内核的依赖问题。此外,当我尝试通过 GUI 升级时,它说升级需要 525M,而 /boot 只有 230M 可用,我假设解决方案是使 /boot 更大,但我不知道该怎么做。澄清一下:
sudo apt-get autoremove
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-extra-3.19.0-25-generic : Depends: linux-image-3.19.0-25-generic but it is not installed
linux-image-extra-3.19.0-28-generic : Depends: linux-image-3.19.0-28-generic but it is not installed
linux-image-extra-3.19.0-30-generic : Depends: linux-image-3.19.0-30-generic but it is not installed
linux-image-extra-3.19.0-31-generic : Depends: linux-image-3.19.0-31-generic but it is not installed
linux-image-extra-3.19.0-33-generic : Depends: linux-image-3.19.0-33-generic but it is not installed
linux-image-extra-3.19.0-37-generic : Depends: linux-image-3.19.0-37-generic but it is not installed
E: Unmet dependencies. Try using -f.
答案1
你设法“强制删除旧内核文件”的方式可能不是在 /boot 分区上腾出一些空间的最佳方法。有一个指南在这个答案以帮助释放一些空间。
对于错误消息中列出的 6 个软件包,使用以下命令逐个删除它们
sudo apt-get remove --purge linux-image-extra-3.19.0-25-generic
sudo apt-get remove --purge linux-image-extra-3.19.0-28-generic
sudo apt-get remove --purge linux-image-extra-3.19.0-30-generic
sudo apt-get remove --purge linux-image-extra-3.19.0-31-generic
sudo apt-get remove --purge linux-image-extra-3.19.0-33-generic
sudo apt-get remove --purge linux-image-extra-3.19.0-37-generic
sudo apt-get autoclean
sudo apt-get autoremove