删除和更新 linux-image 时出错

删除和更新 linux-image 时出错

每当我尝试更新 Elementary OS 时,都会收到以下错误

Removing linux-image-extra-3.13.0-32-generic (3.13.0-32.57) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-32-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: GRUB: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.13.0-32-generic.postrm line 328.
dpkg: error processing package linux-image-extra-3.13.0-32-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.13.0-32-generic (3.13.0-32.57) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-32-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-32-generic /boot/vmlinuz-3.13.0-32-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: GRUB: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.13.0-32-generic.postrm line 328.
dpkg: error processing package linux-image-3.13.0-32-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.13.0-32-generic
 linux-image-3.13.0-32-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试手动删除该包,但它只是返回一个错误。

答案1

这似乎解决了错误。我打开了文件

/etc/default/grub

并在第 11 行找到

GRUB _ CMDLINE _ LINUX _ DEFAULT="quiet splash acpiosi=linux 

_删除之间的空格

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpiosi=linux

解决了问题

相关内容