无法删除损坏的内核包

无法删除损坏的内核包

我在运行 Kubuntu 时遇到无法删除两个损坏的内核包的问题,​​导致我无法更新或安装任何其他包。

我尝试通过 synaptics 删除它们,得到以下结果:

(synaptic:934): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en:sv:en",
    LC_ALL = (unset),
    LC_TIME = "en_SE.UTF-8",
    LC_MONETARY = "en_SE.UTF-8",
    LC_ADDRESS = "en_SE.UTF-8",
    LC_TELEPHONE = "en_SE.UTF-8",
    LC_NAME = "en_SE.UTF-8",
    LC_MEASUREMENT = "en_SE.UTF-8",
    LC_IDENTIFICATION = "en_SE.UTF-8",
    LC_NUMERIC = "en_SE.UTF-8",
    LC_PAPER = "en_SE.UTF-8",
    LANG = "en_SE.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 387112 files and directories currently installed.)
Removing linux-image-extra-3.16.0-53-generic (3.16.0-53.72~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-3.16.0-53-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-53-generic /boot/vmlinuz-3.16.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-53-generic /boot/vmlinuz-3.16.0-53-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-53-generic
grep: /boot/config-3.16.0-53-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_NcsIXF/lib/modules/3.16.0-53-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_NcsIXF/lib/modules/3.16.0-53-generic/modules.builtin: No such file or directory

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-53-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.16.0-53-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-3.16.0-77-generic (3.16.0-77.99~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-3.16.0-77-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-77-generic
grep: /boot/config-3.16.0-77-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_xOjzhJ/lib/modules/3.16.0-77-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_xOjzhJ/lib/modules/3.16.0-77-generic/modules.builtin: No such file or directory

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-77-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.16.0-77-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.16.0-53-generic
 linux-image-extra-3.16.0-77-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:

我也尝试过删除这两个包

sudo dpkg --remove --force-remove-reinstreq linux-image-extra-3.16.0-53-generic

然后我得到这个结果:

larran@larran-VPCSB1V9E:~$ sudo dpkg --remove --force-remove-reinstreq linux-image-extra-3.16.0-53-generic
[sudo] password for larran: 
(Reading database ... 387112 files and directories currently installed.)
Removing linux-image-extra-3.16.0-53-generic (3.16.0-53.72~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-3.16.0-53-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-53-generic /boot/vmlinuz-3.16.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-53-generic /boot/vmlinuz-3.16.0-53-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-53-generic
grep: /boot/config-3.16.0-53-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_KhGV8U/lib/modules/3.16.0-53-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_KhGV8U/lib/modules/3.16.0-53-generic/modules.builtin: No such file or directory

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-53-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.16.0-53-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.16.0-53-generic

我不知道该怎么办。我真的不想重新安装。

运行 df 后我得到以下结果:

larran@larran-VPCSB1V9E:~$ df
Filesystem                   1K-blocks      Used Available Use% Mounted on
udev                           1964816         4   1964812   1% /dev
tmpfs                           396104      1224    394880   1% /run
/dev/mapper/kubuntu--vg-root 476249128 299972776 152061212  67% /
none                                 4         0         4   0% /sys/fs/cgroup
none                              5120         0      5120   0% /run/lock
none                           1980516        76   1980440   1% /run/shm
none                            102400        20    102380   1% /run/user
/dev/sda1                       240972    234895         0 100% /boot

答案1

看起来您正在运行 LVM,并且 /boot 分区已满。增加此分区大小,或从 /boot 中删除不必要的文件(如旧内核等)。

转到仪表板并开始逻辑卷管理查看您的分区。如果您在仪表板中没有看到该分区,则必须安装系统配置-lvm使用 Synaptic。

请告诉我们您的情况。干杯,Al

相关内容