![升级需要 /boot 上有 525M 的可用磁盘空间,而 boot 总共只有 230M,并且还与以前的内核有依赖关系](https://linux22.com/image/878697/%E5%8D%87%E7%BA%A7%E9%9C%80%E8%A6%81%20%2Fboot%20%E4%B8%8A%E6%9C%89%20525M%20%E7%9A%84%E5%8F%AF%E7%94%A8%E7%A3%81%E7%9B%98%E7%A9%BA%E9%97%B4%EF%BC%8C%E8%80%8C%20boot%20%E6%80%BB%E5%85%B1%E5%8F%AA%E6%9C%89%20230M%EF%BC%8C%E5%B9%B6%E4%B8%94%E8%BF%98%E4%B8%8E%E4%BB%A5%E5%89%8D%E7%9A%84%E5%86%85%E6%A0%B8%E6%9C%89%E4%BE%9D%E8%B5%96%E5%85%B3%E7%B3%BB.png)
由于 /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