每当我尝试在 Ubuntu 上安装新软件包时,都会出现以下错误:
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-5.13.0-30-generic (5.13.0-30.33~20.04.1) ...
Setting up linux-image-5.13.0-28-generic (5.13.0-28.31~20.04.1) ...
Setting up linux-image-5.13.0-27-generic (5.13.0-27.29~20.04.1) ...
Processing triggers for linux-image-5.13.0-30-generic (5.13.0-30.33~20.04.1) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.13.0-30-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-30-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 2: /etc/default/grub: Debian: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-30-generic (--configure):
installed linux-image-5.13.0-30-generic package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.13.0-28-generic (5.13.0-28.31~20.04.1) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.13.0-28-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-28-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 2: /etc/default/grub: Debian: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-28-generic (--configure):
installed linux-image-5.13.0-28-generic package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.13.0-27-generic (5.13.0-27.29~20.04.1) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.13.0-27-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.13.0-27-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 2: /etc/default/grub: Debian: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-27-generic (--configure):
installed linux-image-5.13.0-27-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-5.13.0-30-generic
linux-image-5.13.0-28-generic
linux-image-5.13.0-27-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
我该如何解决这个问题?