Sempre que eu tento o apt-get instalar algo ou uso o Gerenciador de Pacotes Synaptic para instalar / desinstalar algo, eu tenho que esperar por > 10 minutos e o seguinte relatório é gerado:
(Reading database ... 146959 files and directories currently installed.)
Removing multitail ...
Processing triggers for man-db ...
Setting up linux-image-2.6.32-41-generic (2.6.32-41.94) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-41-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-45-generic
Found initrd image: /boot/initrd.img-2.6.32-45-generic
Found linux image: /boot/vmlinuz-2.6.32-43-generic
Found initrd image: /boot/initrd.img-2.6.32-43-generic
Found linux image: /boot/vmlinuz-2.6.32-42-generic
Found initrd image: /boot/initrd.img-2.6.32-42-generic
Found linux image: /boot/vmlinuz-2.6.32-41-generic
Found initrd image: /boot/initrd.img-2.6.32-41-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.32-41-generic /boot/vmlinuz-2.6.32-41-generic
run-parts: failed to exec /etc/kernel/postinst.d/dkms: Exec format error
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-41-generic.postinst line 1003.
dpkg: error processing linux-image-2.6.32-41-generic (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.32-42-generic (2.6.32-42.96) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-42-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-45-generic
Found initrd image: /boot/initrd.img-2.6.32-45-generic
Found linux image: /boot/vmlinuz-2.6.32-43-generic
Found initrd image: /boot/initrd.img-2.6.32-43-generic
Found linux image: /boot/vmlinuz-2.6.32-42-generic
Found initrd image: /boot/initrd.img-2.6.32-42-generic
Found linux image: /boot/vmlinuz-2.6.32-41-generic
Found initrd image: /boot/initrd.img-2.6.32-41-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.32-42-generic /boot/vmlinuz-2.6.32-42-generic
run-parts: failed to exec /etc/kernel/postinst.d/dkms: Exec format error
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-42-generic.postinst line 1003.
dpkg: error processing linux-image-2.6.32-42-generic (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.32-43-generic (2.6.32-43.97) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-43-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-45-generic
Found initrd image: /boot/initrd.img-2.6.32-45-generic
Found linux image: /boot/vmlinuz-2.6.32-43-generic
Found initrd image: /boot/initrd.img-2.6.32-43-generic
Found linux image: /boot/vmlinuz-2.6.32-42-generic
Found initrd image: /boot/initrd.img-2.6.32-42-generic
Found linux image: /boot/vmlinuz-2.6.32-41-generic
Found initrd image: /boot/initrd.img-2.6.32-41-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.32-43-generic /boot/vmlinuz-2.6.32-43-generic
run-parts: failed to exec /etc/kernel/postinst.d/dkms: Exec format error
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-43-generic.postinst line 1003.
dpkg: error processing linux-image-2.6.32-43-generic (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.32-45-generic (2.6.32-45.102) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-45-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-45-generic
Found initrd image: /boot/initrd.img-2.6.32-45-generic
Found linux image: /boot/vmlinuz-2.6.32-43-generic
Found initrd image: /boot/initrd.img-2.6.32-43-generic
Found linux image: /boot/vmlinuz-2.6.32-42-generic
Found initrd image: /boot/initrd.img-2.6.32-42-generic
Found linux image: /boot/vmlinuz-2.6.32-41-generic
Found initrd image: /boot/initrd.img-2.6.32-41-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.32-45-generic /boot/vmlinuz-2.6.32-45-generic
run-parts: failed to exec /etc/kernel/postinst.d/dkms: Exec format error
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-45-generic.postinst line 1003.
dpkg: error processing linux-image-2.6.32-45-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-2.6.32-45-generic; however:
Package linux-image-2.6.32-45-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 (= 2.6.32.45.52); however:
Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
dependency problems - leaving unconfigured
Setting up linux-headers-2.6.32-45-generic (2.6.32-45.102) ...
No apport report written because MaxReports has already been reached
No apport report written because MaxReports has already been reached
No apport report written because MaxReports has already been reached
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 2.6.32-45-generic /boot/vmlinuz-2.6.32-45-generic
run-parts: failed to exec /etc/kernel/header_postinst.d/dkms: Exec format error
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-2.6.32-45-generic.postinst line 110.
dpkg: error processing linux-headers-2.6.32-45-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-headers-generic:
linux-headers-generic depends on linux-headers-2.6.32-45-generic; however:
Package linux-headers-2.6.32-45-generic is not configured yet.
dpkg: error processing linux-headers-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports has already been reached
No apport report written because MaxReports has already been reached
Errors were encountered while processing:
linux-image-2.6.32-41-generic
linux-image-2.6.32-42-generic
linux-image-2.6.32-43-generic
linux-image-2.6.32-45-generic
linux-image-generic
linux-generic
linux-headers-2.6.32-45-generic
linux-headers-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Há um grande atraso sempre que essa linha é exibida:
update-initramfs: Generating /boot/initrd.img-2.6.32-XXX-generic
... onde XXX no meu caso leva valores de 41 a 45.
Meus relatórios uname -srv
:
Linux 2.6.32-45-generic #102-Ubuntu SMP Wed Jan 2 21:53:06 UTC 2013
Eu tentei sudo apt-get install -f
, mas isso não resolveu meu problema.
Não sei se isso ajuda, mas a caixa de diálogo final que o gerenciador de pacotes Synaptic mostra sempre que um pacote é removido ou adicionado é:
E: linux-image-2.6.32-41-generic: subprocess installed post-installation script returned error exit status 2
E: linux-image-2.6.32-42-generic: subprocess installed post-installation script returned error exit status 2
E: linux-image-2.6.32-43-generic: subprocess installed post-installation script returned error exit status 2
E: linux-image-2.6.32-45-generic: subprocess installed post-installation script returned error exit status 2
E: linux-image-generic: dependency problems - leaving unconfigured
E: linux-generic: dependency problems - leaving unconfigured
E: linux-headers-2.6.32-45-generic: subprocess installed post-installation script returned error exit status 2
E: linux-headers-generic: dependency problems - leaving unconfigured
Ah, e estou no Ubuntu 10.04LTS.
@Wolfer: O comando gera o seguinte:
> dpkg -l | grep linux-header
ii linux-headers-2.6.32-45 2.6.32-45.102 Header files related to Linux kernel version
iF linux-headers-2.6.32-45-generic 2.6.32-45.102 Linux kernel headers for version 2.6.32 on x
iU linux-headers-generic 2.6.32.45.52 Generic Linux kernel headers
Eu não sou um usuário avançado (ainda? :)) Esta VM me foi dada do trabalho e eu estava simplesmente tentando "arrumar" / personalizar. Não tem idéia de quando isso foi criado (ano atrás? Talvez mais?).
dpkg -l | grep linux-image
informa o seguinte:
> dpkg -l | grep linux-image
pi linux-image-2.6.32-21-generic 2.6.32-21.32 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-41-generic 2.6.32-41.94 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-42-generic 2.6.32-42.96 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-43-generic 2.6.32-43.97 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-45-generic 2.6.32-45.102 Linux kernel image for version 2.6.32 on x86
iU linux-image-generic 2.6.32.45.52 Generic Linux kernel image
@Wolfer: apt-get install linux-generic
me dá:
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
8 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
... e depois a mesma coisa novamente, começa com:
Setting up linux-image-2.6.32-41-generic (2.6.32-41.94) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-41-generic
... and on and on ...