尝试安装 Apache2 但出现错误,因为子进程 /usr/bin/dpkg 返回错误代码 (1)

尝试安装 Apache2 但出现错误,因为子进程 /usr/bin/dpkg 返回错误代码 (1)
Removing linux-image-4.4.0-142-generic (4.4.0-142.168) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-142-generic /boot/vmlinuz-4.4.0-142-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-142-generic
run-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 4.4.0-142-generic /boot/vmlinuz-4.4.0-142-generic
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-4.4.0-140-generic
run-parts: /etc/kernel/postrm.d/x-grub-legacy-ec2 exited with return code 10
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-142-generic.postrm line 330.
dpkg: error processing package linux-image-4.4.0-142-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-143-generic (4.4.0-143.169) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.4.0-143-generic
/etc/kernel/postrm.d/x-grub-legacy-ec2:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-4.4.0-140-generic
run-parts: /etc/kernel/postrm.d/x-grub-legacy-ec2 exited with return code 10
dpkg: error processing package linux-image-4.4.0-143-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-4.4.0-142-generic
 linux-image-4.4.0-143-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

相关内容