Broken package

Asked by danyodin

After a crash, I get the following error when trying to open Synaptic:

E: Unable to parse package file /var/lib/apt/lists/il.archive.ubuntu.com_ubuntu_dists_intrepid_universe_binary-i386_Packages (1)
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.

The package is there so I suppose it's corrupted. How can I fix/replace it?

Thanks in advance,
Danny

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu synaptic Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:
Revision history for this message
Shane Fagan (shanepatrickfagan) said :
#1

Have a look at this trend.
http://www.uluga.ubuntuforums.org/showthread.php?t=712184

Hope this helps
Shane

Revision history for this message
peter (peter-neuweiler) said :
#2

If you boot up the system press the Esc key. Choose the recovery mode and you will find a menu where you can start the process Broken packages. These process will repair all broken packages.

Hope it helps.
Peter

Revision history for this message
danyodin (danyodin) said :
#3

Thanks for the comments.

I did follow the suggestions in the thread (apt fix and changing the main server in synaptic) and tried to fix the broken packages in recovery mode, I got to the following:

E: Could not open file /var/lib/dpkg/status - open (2 No such file or directory)
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.

Any suggestion?

Revision history for this message
peter (peter-neuweiler) said :
#4

Hope you will get a wise answer.
Peter

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

Please try this in a terminal:
sudo dpkg --clear-avail && sudo apt-get update
sudo apt-get upgrade

Reference:
https://help.ubuntu.com/community/GnomeTerminal
https://help.ubuntu.com/community/RootSudo#Usage

Revision history for this message
danyodin (danyodin) said :
#6

I tried Sam's suggestion - still same thing. It reads some of the packages but then reports an error:

Hit http://archive.ubuntu.com intrepid Release.gpg
Ign http://archive.ubuntu.com intrepid/main Translation-en_US
Ign http://archive.ubuntu.com intrepid/restricted Translation-en_US
Ign http://archive.ubuntu.com intrepid/universe Translation-en_US
Ign http://archive.ubuntu.com intrepid/multiverse Translation-en_US
Hit http://archive.ubuntu.com intrepid-updates Release.gpg
Ign http://archive.ubuntu.com intrepid-updates/main Translation-en_US
Ign http://archive.ubuntu.com intrepid-updates/restricted Translation-en_US
Ign http://archive.ubuntu.com intrepid-updates/universe Translation-en_US
Ign http://archive.ubuntu.com intrepid-updates/multiverse Translation-en_US
Hit http://archive.ubuntu.com intrepid-security Release.gpg
Ign http://archive.ubuntu.com intrepid-security/main Translation-en_US
Ign http://archive.ubuntu.com intrepid-security/restricted Translation-en_US
Ign http://archive.ubuntu.com intrepid-security/universe Translation-en_US
Ign http://archive.ubuntu.com intrepid-security/multiverse Translation-en_US
Hit http://archive.ubuntu.com intrepid Release
Hit http://archive.ubuntu.com intrepid-updates Release
Hit http://archive.ubuntu.com intrepid-security Release
Hit http://archive.ubuntu.com intrepid/main Packages
Hit http://archive.ubuntu.com intrepid/restricted Packages
Hit http://archive.ubuntu.com intrepid/main Sources
Hit http://archive.ubuntu.com intrepid/restricted Sources
Hit http://archive.ubuntu.com intrepid/universe Packages
Hit http://archive.ubuntu.com intrepid/universe Sources
Hit http://archive.ubuntu.com intrepid/multiverse Packages
Hit http://archive.ubuntu.com intrepid/multiverse Sources
Hit http://archive.ubuntu.com intrepid-updates/main Packages
Hit http://archive.ubuntu.com intrepid-updates/restricted Packages
Hit http://archive.ubuntu.com intrepid-updates/main Sources
Hit http://archive.ubuntu.com intrepid-updates/restricted Sources
Hit http://archive.ubuntu.com intrepid-updates/universe Packages
Hit http://archive.ubuntu.com intrepid-updates/universe Sources
Hit http://archive.ubuntu.com intrepid-updates/multiverse Packages
Hit http://archive.ubuntu.com intrepid-updates/multiverse Sources
Hit http://archive.ubuntu.com intrepid-security/main Packages
Hit http://archive.ubuntu.com intrepid-security/restricted Packages
Hit http://archive.ubuntu.com intrepid-security/main Sources
Hit http://archive.ubuntu.com intrepid-security/restricted Sources
Hit http://archive.ubuntu.com intrepid-security/universe Packages
Hit http://archive.ubuntu.com intrepid-security/universe Sources
Hit http://archive.ubuntu.com intrepid-security/multiverse Packages
Hit http://archive.ubuntu.com intrepid-security/multiverse Sources
Reading package lists... Error!
E: Could not open file /var/lib/dpkg/status - open (2 No such file or directory)
E: The package lists or status file could not be parsed or opened.

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

Ok,
you can copy the status-old file and make it the current status file like this:
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

then again:
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade

Revision history for this message
danyodin (danyodin) said :
#8

Thanks Sam, that solved my question.