Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3246  / 2 Years ago, sun, march 6, 2022, 4:21:11

Whenever I try to apt-get install something or use the Synaptic Package Manager to install / uninstall something, I have to wait for > 10 minutes and the following report is generated:



(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)


There's a great delay whenever this line is shown:



update-initramfs: Generating /boot/initrd.img-2.6.32-XXX-generic


...where XXX in my case takes values from 41 to 45.



My uname -srv reports:



Linux 2.6.32-45-generic #102-Ubuntu SMP Wed Jan 2 21:53:06 UTC 2013


I've tried sudo apt-get install -f but it did not solve my issue.



I don't know if it helps but the final dialog box that Synaptic package manager shows whenever a package is removed or added is:



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


Oh, and I'm on Ubuntu 10.04LTS.



@Wolfer: The command outputs the following:



> 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


I'm not a power user (yet? :)) This VM was given to me from work and I was simply trying to "tidy up" / personalise. No idea when this was created (year ago? Maybe more?).



dpkg -l | grep linux-image reports the following:



> 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 gives me:



[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.


...and then the same thing all over again, it starts with:



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 ...

More From » apt

 Answers
1

The linux-image-generic is not set up properly on your system. This means that apt won't be able to install/update/configure any other kernels as well. This results in the error you are getting. There are a few ways to deal with this; the easiest would be to run apt-get install linux-image-generic, and see what happens. If this works (I think it should) then follow that up by running apt-get install -f.



If you get any more errors in the process post them here.






Okay, it seems that the easiest path won't work. Try running dpkg --unpack linux-image-generic. If you get an error about that there's no such package (which is likely) run



wget http://ubuntu.secsup.org//pool/main/l/linux-meta/linux-image-generic_2.6.32.45.52_i386.deb and then dpkg -i <path to the package you downloaded>. If there's any error post it here.






You ran into a dependency-chain problem. You can resolve this by manually downloading and trying to install every package that is mentioned in the errors you get. Eventually you should find the root of the problem and that should cause every other package to be corrected as well.


[#32969] Monday, March 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atetamme

Total Points: 11
Total Questions: 121
Total Answers: 109

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;