无法清除 /boot 中的旧内核文件

无法清除 /boot 中的旧内核文件

我正在尝试更新我的服务器

navin@ubuntu:~$ sudo apt-get dist-upgrade
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-3.2.0-67-generic but it is not installed
E: Unmet dependencies. Try using -f.

当我尝试使用 apt-get -f install 时

navin@ubuntu:~$ sudo apt-get -f install linux-image-3.2.0-67-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
fdutils linux-doc-3.2.0 linux-source-3.2.0 linux-tools
The following NEW packages will be installed:
linux-image-3.2.0-67-generic
0 upgraded, 1 newly installed, 0 to remove and 29 not upgraded.
15 not fully installed or removed.
Need to get 0 B/38.8 MB of archives.
After this operation, 150 MB of additional disk space will be used.
(Reading database ... 147902 files and directories currently installed.)
Unpacking linux-image-3.2.0-67-generic (from .../linux-image-3.2.0-67-generic_3.2.0- 67.101_amd64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-67-generic_3.2.0-   67.101_amd64.deb (--unpack):
failed in write on buffer copy for backend dpkg-deb during `./boot/vmlinuz-3.2.0-67-generic': No space left on device
No apport report written because MaxReports is reached already
                                                          dpkg-deb: error: subprocess   paste was killed by signal (Broken pipe)
  Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-67-generic /boot/vmlinuz-3.2.0-67-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-67-generic /boot/vmlinuz-3.2.0-67-generic
 Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.2.0-67-generic_3.2.0-67.101_amd64.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)

当我尝试删除 /boot 中的旧内核文件时

root@ubuntu: 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-generic : Depends: linux-image-3.2.0-67-generic but it is not installed
E: Unmet dependencies. Try using -f.

请提供一些解决方案

答案1

这是主要的问题:

No space left on device

您的/boot分区已经没有剩余空间了。请尝试执行以下操作:

手动删除未使用的内核映像。但是,小心不要删除使用过的版本,否则您将无法再启动。uname -r在终端中输入。所有包含此版本字符串的内容都不能删除。

清理启动分区后,apt-get -f install linux-image-3.2.0-67-generic再次使用。

然后使用以下命令彻底更新您的系统:

apt-get dist-upgrade

答案2

我认为最好安装Ubuntu 调整并通过它去除旧内核。

它会自动为您完成此操作。

你必须去看门人选项卡并选择旧内核

然后打干净的按钮,您就准备好了...:)

相关内容