我收到错误代码“E: 子进程 /usr/bin/dpkg 返回错误代码 (1)”

我收到错误代码“E: 子进程 /usr/bin/dpkg 返回错误代码 (1)”
sudo apt-get upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 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-unsigned-5.11.0-27-generic (5.11.0-27.29~20.04.1) ...
Processing triggers for linux-image-unsigned-5.11.0-27-generic (5.11.0-27.29~20.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-27-generic
I: The initramfs will attempt to resume from /dev/sda6
I: (UUID=09a8cb63-4799-48d8-b068-76df583caf88)
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 1: /etc/default/grub: If: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-unsigned-5.11.0-27-generic (--configure):
 installed linux-image-unsigned-5.11.0-27-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-unsigned-5.11.0-27-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

相关内容