Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Everytime I sudo apt-get update it always not complete and will say in the end

E: Read error - read (5: Input/output error)
E: The package lists or status file could not be parsed or opened.

Same goes, when I try to install something and do sudo apt-get install <some app>

What should I do ? I admit, that my drive has bad sectors, could that be the reason? Is there anything else I can do?

share|improve this question
    
I am experiencing the same problem,even though i followed solution provided by Avinash Raj the error recurrs. is there any other way to approach this problem. thanks in advace –  sai kumar May 9 at 12:06
    

2 Answers 2

up vote 8 down vote accepted

Try using an older status file,

sudo mv /var/lib/dpkg/status /var/lib/dpkg/status.bad
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo apt-get update
share|improve this answer
1  
thank you 2x Avinash :) .. that really saves me.. All along it was just the status file is my problem? –  Teody C. Seguin Jan 24 at 13:58
1  
The problem persists even after doing the steps you told, may be my status-old is also corrupt. –  Prabhu Aug 24 at 8:35
    
the try the one within the backup directory /var/backups/dpkg.status.0 –  Avinash Raj Aug 24 at 8:39
    
In my case, this did not work. I removed /var/lib/dpkg/status and just created an empty one with touch /var/lib/dpkg/status and that fixed the problem. –  foxbunny Sep 2 at 16:43

I was running into a similar error:

Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.

I followed similar suggestions to copy status-old.

$ head /var/lib/dpkg/status
$ head /var/lib/dpkg/status-old

All of my status files were blank for some reason. Luckily, I found out there are backups of these files:

$ ls -l /var/backups/dpkg.status.*
-rw-r--r-- 1 root root 444620 Nov 15 06:33 /var/backups/dpkg.status.0
-rw-r--r-- 1 root root 444620 Nov 15 06:33 /var/backups/dpkg.status.1.gz
-rw-r--r-- 1 root root 128168 Sep 20  2013 /var/backups/dpkg.status.2.gz
-rw-r--r-- 1 root root 112545 Sep 16  2013 /var/backups/dpkg.status.3.gz
-rw-r--r-- 1 root root 107767 Sep 14  2013 /var/backups/dpkg.status.4.gz
-rw-r--r-- 1 root root 107766 Sep 11  2013 /var/backups/dpkg.status.5.gz
-rw-r--r-- 1 root root  94583 Sep 11  2013 /var/backups/dpkg.status.6.gz

I checked the latest backup...

$ head /var/backups/dpkg.status.0

...but it was still blank. So I unzipped an older one...

$ gunzip /var/backups/dpkg.status.1.gz
$ head /var/backups/dpkg.status.1

This time there was content. So I copied it...

$ cp /var/backups/dpkg.status.1 /var/lib/dpkg/status

Then apt-get update ran without problems.

Credit goes to this post.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.