半分だけインストールされたパッケージ悪夢 - どうすれば解決できますか?

半分だけインストールされたパッケージ悪夢 - どうすれば解決できますか?

私は最近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)

システムを再インストールする以外は何もできません。

このパッケージを強制的に削除する方法についての他のアイデアはありますか?

ベストアンサー1

おすすめ記事