linux-headers-2.6.32-25 error 2 when updating

Asked by Garthhh

I can't update or install new software,
I ran this on a terminal

logar@Logar:~$ sudo dpkg --configure -a
[sudo] password for logar:
logar@Logar:~$ sudo apt-get update && sudo apt-get upgrade

& got this error

Reading database ... 55%dpkg: unrecoverable fatal error, aborting:
 failed in buffer_read(fd): files list for package `linux-headers-2.6.32-25-generic': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)

I actually get this error, if I try to add anything on synaptic, or update or install any thing from software center

If I look up the 2 packages with similar titles in synaptic & try to reinstall, synaptic turns gray & crashes

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Try:

sudo apt-get clean; sudo apt-get -f install

May help

Revision history for this message
Garthhh (gchoyman) said :
#2

Same error

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

Thanks Sam

http://ubuntuforums.org/showthread.php?t=1232143
the last post seems very similar, but I don't quite follow which file I should edit?
[last post] makes the most sense, when I go to where the offending files are [usr/share/doc/linux-headers-2.6.32-25-generic], they are dated october, while linux-headers-2.6.32-26-generic are dated wednesday

it's a little over my head, but I'm getting closer to understanding :D
__________________

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

The offending files are not in /usr/share/....
Did you follow the suggestion of the last post?
http://ubuntuforums.org/showpost.php?s=951d964348db825d4baa6322c9795e27&p=10010092&postcount=7

#1
Backup the file (rename it with whatever ending you like)e.g.:
sudo cp /var/lib/dpkg/status /var/lib/dpkg/status-broken

#2
Open the file and find the line regarding: linux-headers-2.6.32-25-generic
gksudo gedit /var/lib/dpkg/status

Remove only the lines concerning this package.
## You can search gedit by ctrl+F and insert the text in the popup window.
## Don't forget to leave one empty line between the other two packages left above and below.

## Before edit example
## Content of lines incl. linux-headers-2.6.32-25-generic between two other packages.
http://paste.ubuntu.com/538121/

## After removal example
http://paste.ubuntu.com/538124/

#3
Save the edited file.
Close all package management GUIs e.g. Synaptic, Software Center... while working in the terminal.
In case one of them outputs an error post it here.

sudo dpkg --configure -a
sudo apt-get -f install

In case reinstall the package:
sudo apt-get install linux-headers-2.6.32-25-generic

https://help.ubuntu.com/community/AptGet/Howto
http://manpages.ubuntu.com/manpages/maverick/en/man8/apt-get.8.html

Revision history for this message
Garthhh (gchoyman) said :
#6

Thanks Sam
for being so patient & helping me understand/learn some

oh I get it now
the fault is in dpkg
I go to
var/lib/dpkg/status & copy, but I can't paste it back in the same place
I toss the copy [var/lib/dpkg/status-broken] in documents in case things go wrong, it's better to make a back up & not need it, than to be SOL
I mess around before I figure out the only way to get permission to modify the file is using a terminal [sudo]
everything updates

Revision history for this message
Garthhh (gchoyman) said :
#7

Thanks Sam, that solved my question.

Revision history for this message
Achim Schmitz (achim-59) said :
#8

Thank you so much, Sam. When an update came up with the same error as the one Garthhh had, I searched the Ubuntu bugs site and found your advice. Update manager now works again.

I have saved your steps as a guide in my technical folder for future reference in case I ever end up with this type of error again.

Cheers

Achim_59 :-)