절반만 설치된 패키지 악몽 - 어떻게 해결하나요?

절반만 설치된 패키지 악몽 - 어떻게 해결하나요?

저는 최근에 Linux Mint(18.3, x64) 시스템을 업데이트하려고 했습니다. 모든 것이 잘 진행되고 있지만 linux-image-extra-4.13.0-41-generic및 의 구성 스크립트에서 오류가 발생했습니다 linux-image-extra-4.13.0-41-generic. 한동안 다른 패키지를 설치할 수 있었지만 제거하려고 시도한 후에는 더 이상 아무것도 설치할 수 없습니다. 이를 제거하기 위해 다음을 시도했습니다.

 sudo apt remove linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
 sudo apt purge linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
 sudo apt install -f
 sudo dpkg --remove --force-remove-reinstreq --dry-run linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
 sudo dpkg --remove --force-remove-reinstreq linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic

그들 중 누구도 패키지를 제거하지 않았습니다.

패키지를 설치하려고 할 때도 다음과 같은 메시지가 표시됩니다.

Removing linux-image-extra-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
depmod: FATAL: could not load /boot/System.map-4.13.0-41-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-41-generic
Warning: No support for locale: en_US.utf8
depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 64
dpkg: error processing package linux-image-extra-4.13.0-41-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
update-initramfs: Deleting /boot/initrd.img-4.13.0-41-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.13.0-41-generic.postrm line 330.
dpkg: error processing package linux-image-4.13.0-41-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-4.13.0-41-generic
 linux-image-4.13.0-41-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

시스템을 다시 설치하는 것 외에는 할 수 있는 일이 없습니다.

이 패키지를 강제로 제거하는 방법에 대한 다른 아이디어가 있습니까?

관련 정보