linux-header files problem causing installation errors

Asked by Rungroj

I am having the same problem as belfo in question https://answers.launchpad.net/ubuntu/+question/78599
from a year ago.
Main difference is that I am running 10.04 Ubuntu Remix on an HP laptop (integrated Intel graphics so no Nvidia issues) and the problem is with linux-headers-2.6.32-23-generic.

Same error though, every time I try to install anything. Some things won't install, others give the error but appear to install correctly and function just fine. Here's the main problem lines:

E: linux-headers-2.6.32-23-generic: subprocess installed post-installation script returned error exit status 2
E: linux-headers-generic: dependency problems - leaving unconfigured

The problem started after update manager hung when running for the first time and trying to install a large number of system updates.

All the suggestions in the thread from #78599 didn't work for me either.

How do I get around this problem?

Thanks

Rungroj

PS for the record I am new to linux.

Question information

Revision history for this message
Sam_ (and-sam) said :
#1

I'd boot with another kernel e.g. 2.6.32-22, then
- purge 2.6.32-23
- clean up package cache
- run dpkg-configure
- reinstall, update.

https://help.ubuntu.com/community/AptGet/Howto

Revision history for this message
Sam_ (and-sam) said :
#2

Sam suggests this article as an answer to your question:
FAQ #52: “'dpkg --configure -a' problem when trying to run Synaptic”.

Revision history for this message
Rungroj (paulastell) said :
#3

Thanks for the suggestions Sam. Since your first is over my head and I am going to have to spend some time trying to figure out how to do it, I thought I'd try your second. Here's the result:

rungroj@ubuntu-remix:~$ sudo dpkg --configure -a
[sudo] password for rungroj:
Setting up linux-headers-2.6.32-23-generic (2.6.32-23.37) ...
dpkg (subprocess): unable to execute installed post-installation script: Exec format error
dpkg: error processing linux-headers-2.6.32-23-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-23-generic; however:
  Package linux-headers-2.6.32-23-generic is not configured yet.
dpkg: error processing linux-headers-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-headers-2.6.32-23-generic
 linux-headers-generic

Before I spend some considerable time figuring out the first suggestion, does this error report give an idea? Can I just get another copy of the post-installation script? If so from where? And to where do I copy it?

Again - any help greatly appreciated!

Thanks

Rungroj

Revision history for this message
Sam_ (and-sam) said :
#4

Workaround is mentioned in topic of bug report.
You can try to remove postinst of linux-headers-2.6.32-23-generic
in
/var/lib/dpkg/info

Find kernel images:
dpkg -l | grep -i ^ii | grep -i linux-image

Purge a package
e.g.
sudo purge linux-image-2.6.32-23-generic

https://help.ubuntu.com/community/AptGet/Howto
http://www.debianhelp.co.uk/pkgadm.htm

> Before I spend some considerable time figuring out
... is considered a good start of learning.

Enjoy Ubuntu.

Revision history for this message
Rungroj (paulastell) said :
#5

Thanks Sam - I got it figured. The linux-headers-2.6.32-23-generic.postinst file in /var/lib/dpkg/info had a size of 0 bytes. So, somehow it was corrupted when the headers were installed.

Using the Synaptic Package Manager I totally removed and reinstalled linux-headers-2.6.32-23-generic and linux-headers-generic.

Bingo! Everything seems good now. Thanks for your help.

Rungroj

PS I am enjoying Ubuntu! I am amazed by how good the hardware support for my HP laptop is. Even the media keys work.
PPS Yeah, yeah, I'll spend some time learning linux :-)