9

When I run sudo apt-get update I get this error:

Reading package lists... Error!
E: Unable to parse package file /var/lib/dpkg/status (1)
E: The package lists or status file could not be parsed or opened.

What each line is saying and how to solve it?

I'm running Linux Mint 17 Qiana Cinnamon in VMWare Workstation 10.0.2.

| improve this question | | | | |
  • 1
    Does /var/lib/dpkg/status exist? If so, what are its permissions, and is it empty? If not, what does it contain? – Faheem Mitha Jun 26 '14 at 23:54
  • Yes, it does exist. Its permissions are 644. It contains a detailed list of packages-such as the package name, status, priority...etcetera. There is also a "status-old" file with the same permissions. It appears to contain the same information. – Jeffrey_B Jun 27 '14 at 0:37
19

If you google out this error there are plenty of links which describe this error. It seems that the file is messed up. You can try out the options specified here.

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

This below option did not work for this particular case.

Another link that describes the similar issue is here.

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
| improve this answer | | | | |
  • The first option worked. I tried the second option first, but the error appeared again. Thanks Ramesh. – Jeffrey_B Jun 27 '14 at 0:46
  • 1
    Welcome to U & L Stack Exchange. Glad it worked. :) – Ramesh Jun 27 '14 at 1:08
  • 1
    @Ramesh that's mine. :-) – Avinash Raj Jun 27 '14 at 1:40
  • @AvinashRaj, yeah. I see you are pretty active in AU than here :) – Ramesh Jun 27 '14 at 1:41
  • @Ramesh you must remove the second code block. Because removing the files inside /var/lib/apt/lists/ shouldn't work for him. – Avinash Raj Jun 27 '14 at 1:48
1

It's working fine to remove files in lists folder.

By the way apt-get is working fine after command line bash I found out over The Net.

Just add:

sudo apt-get -f install

to have an update/upgrade working at well.

| improve this answer | | | | |
0

As mentioned above even I had the same error and the second solution works perfectly as described by Mr.Ramesh

$ sudo rm /var/lib/apt/lists/* -vf
$ sudo apt-get clean
$ sudo apt-get update
$ sudo apt-get upgrade

Works perfectly to clear out the mess created. Generally this error is caused due to network related issues.

| improve this answer | | | | |

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