Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I try to install ANY application through terminal, I get this error:

Reading package lists... Error!
E: Read error - read (21: Is a directory)
E: The package lists or status file could not be parsed or opened.

And software center is also not opening.

Neither is Synaptic Package Manager. It gives the following error when I try to open it:

E: Read error - read (21: Is a directory)
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.

Solutions I tried so far, but didn't fix the problem:

sudo rm -rf /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_restricted_binary-amd64_Packages
sudo apt-get update
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

Any suggestions? I cannot even use apt-get install.

share|improve this question

1 Answer

/var/lib/dpkg/status

/var/lib/dpkg/available

/var/lib/dpkg/diversions

check the files above, if the files not exists, create an empty file.

command to create empty file sudo touch /var/lib/dpkg/status

share|improve this answer
Actually, i was about to comment this. I did that. The following error showed up now. """<br> Reading package lists... Error!<br> E: Encountered a section with no Package: header<br> E: Problem with MergeList /var/lib/dpkg/status<br> E: The package lists or status file could not be parsed or opened.<br> """ – user128677 Feb 5 at 7:12
Oh, I used nautilus and did it manually (right lick, empty document..) I forgot to use touch. Nice mentioning Teifi, Thank you very much – user128677 Feb 5 at 7:16

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.