Pesadelo de pacote semi-instalado - como consertar?

1

Eu recentemente (tentei) atualizar meu sistema Linux Mint (18.3, x64). Tudo correu bem, mas recebi um erro com os scripts de configuração para linux-image-extra-4.13.0-41-generic e linux-image-extra-4.13.0-41-generic . Por um tempo, pude instalar outros pacotes, mas depois de tentar removê-los, não pude mais instalar nada. Para removê-los, tentei:

 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

Nenhum deles removeu os pacotes.

Eu também recebo isso ao tentar instalar um pacote:

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)

Não há muito o que fazer além de reinstalar o sistema.

Alguma outra ideia para forçar a remoção deste pacote?

    
por Zackary 07.06.2018 / 01:54

0 respostas