Erro ao instalar pacotes ou atualizar devido ao dpkg: erro ao processar linux-image-extra-3.11.0-15-generic

4

Alguns dias atrás eu tentei instalar 0ad, um jogo, através do terminal. Eu acidentalmente fechei o terminal antes de terminar e agora não consigo instalar ou atualizar nenhum programa na minha máquina. Estou correndo 13.10.

Eu tentei pesquisar e encontrei muitos artigos, postagens e discussões sobre esse erro, mas ainda não encontrei um método que funcione para corrigi-lo.

Eu tentei rodar

sudo apt-get clean && sudo apt-get autoremove

quais saídas

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-3.11.0-12 linux-headers-3.11.0-12-generic linux-image-3.11.0-12-generic linux-image-extra-3.11.0-12-generic
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 210 MB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 315931 files and directories currently installed.)
Removing linux-headers-3.11.0-12-generic ...
Removing linux-headers-3.11.0-12 ...
Removing linux-image-extra-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-extra-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.11.0-12-generic ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
dkms: removing: bbswitch 0.7 (3.11.0-12-generic) (i686)

-------- Uninstall Beginning --------
Module:  bbswitch
Version: 0.7
Kernel:  3.11.0-12-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

bbswitch.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.11.0-12-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod.....

DKMS: uninstall completed.
dkms: removing: nvidia-319-updates 319.60 (3.11.0-12-generic) (i686)

-------- Uninstall Beginning --------
Module:  nvidia-319-updates
Version: 319.60
Kernel:  3.11.0-12-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

nvidia_319_updates.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.11.0-12-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.11.0-12-generic
 linux-image-3.11.0-12-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Então eu também tentei rodar

sudo dpkg --configure -a

quais saídas

dpkg: dependency problems prevent configuration of linux-image-extra-3.11.0-15-generic:
 linux-image-extra-3.11.0-15-generic depends on linux-image-3.11.0-15-generic; however:
  Package linux-image-3.11.0-15-generic is not configured yet.

dpkg: error processing linux-image-extra-3.11.0-15-generic (--configure):
 dependency problems - leaving unconfigured
Setting up linux-image-3.11.0-17-generic (3.11.0-17.31) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.11.0-17-generic.postinst line 1010.
dpkg: error processing linux-image-3.11.0-17-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.11.0-17-generic:
 linux-image-extra-3.11.0-17-generic depends on linux-image-3.11.0-17-generic; however:
  Package linux-image-3.11.0-17-generic is not configured yet.

dpkg: error processing linux-image-extra-3.11.0-17-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.11.0-17-generic; however:
  Package linux-image-3.11.0-17-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-3.11.0-17-generic; however:
  Package linux-image-extra-3.11.0-17-generic is not configured yet.

dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.11.0.17.18); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-pae:
 linux-generic-pae depends on linux-generic (= 3.11.0.17.18); however:
  Package linux-generic is not configured yet.

dpkg: error processing linux-generic-pae (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-extra-3.11.0-15-generic
 linux-image-3.11.0-17-generic
 linux-image-extra-3.11.0-17-generic
 linux-image-generic
 linux-generic
 linux-generic-pae

Estou perplexo e não sei para onde ir a partir daqui.

Qualquer ajuda que você puder fornecer será muito apreciada.

A saída de

uname -r

é

3.11.0-15-generic

EDITAR

eu corri

sudo dpkg -P linux-image-3.11.0-12-generic

e tem saída

(Reading database ... 286111 files and directories currently installed.)
Removing linux-image-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-3.11.0-12-generic (--purge):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-3.11.0-12-generic

Eu então corri

sudo apt-get install -f

e tem saída

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-3.11.0-12-generic linux-image-extra-3.11.0-12-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
9 not fully installed or removed.
After this operation, 136 MB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 286111 files and directories currently installed.)
Removing linux-image-extra-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-extra-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.11.0-12-generic
 linux-image-3.11.0-12-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por Blackbart42 22.02.2014 / 18:24

2 respostas

0

Seu problema pode estar relacionado à corrupção do banco de dados debconf.
Execute o seguinte:

sudo /usr/share/debconf/fix_db.pl

Você pode ter corrigido o problema ali mesmo.
Verifique se algum desses modelos foi afetado executando os seguintes comandos bash:

diff -u /var/cache/debconf/config.dat{-old,}    | grep ^[+-]Name
diff -u /var/cache/debconf/templates.dat{-old,} | grep ^[+-]Name

Você pode até querer executar o seguinte comando no pacote que estava causando problemas:

 dpkg-reconfigure <your package>  
    
por Trevor Hickey 11.09.2014 / 10:56
0

A mensagem de erro é bastante autoexplicativa:

/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution

Você tem um erro no seu /etc/default/grub .

    
por fkraiem 11.12.2015 / 13:06

Tags