apt can't recover from file corruptions

Bug #735491 reported by Barry Warsaw
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: apt

This morning I'm getting lots of errors from apt-get update of the form:

Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_natty_restricted_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.

This affects files such as

us.archive.ubuntu.com_ubuntu_dists_natty_main_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty_main_i18n_Translation-en%5fUS
us.archive.ubuntu.com_ubuntu_dists_natty_multiverse_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty_multiverse_i18n_Translation-en%5fUS

The resolution appears to be to move the files aside and re-update, however it seems like apt should just do that itself. Self-recovery would be much more user friendly.

I'll attach the offending files in the event that would be helpful.

Revision history for this message
Barry Warsaw (barry) wrote :

Heh. This occurred because my machine did an update behind the scenes. I was on a hotel network, but the 24hr subscription had timed out. This means NM thinks I'm still on a valid network, but of course the only thing it can connect to is the hotel's BUY ME page. Every corrupted apt file contains the contents of this hotel page.

So there seems to be several problems here. First, apt should be able to self-correct for busted files. Second, apt should probably ensure that it's talking to a real archive despite the lies of NM. :)

Revision history for this message
Barry Warsaw (barry) wrote :

I don't really need to attach all the corrupted files. They're all of the following format.

Revision history for this message
Barry Warsaw (barry) wrote :

Also note that I'm not entirely sure that moving the offending files out of the way is the right fix.

Revision history for this message
Barry Warsaw (barry) wrote :

Full list of corrupted files:

us.archive.ubuntu.com_ubuntu_dists_natty_main_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty_main_i18n_Translation-en%5fUS
us.archive.ubuntu.com_ubuntu_dists_natty_multiverse_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty_multiverse_i18n_Translation-en%5fUS
us.archive.ubuntu.com_ubuntu_dists_natty_restricted_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty_restricted_i18n_Translation-en%5fUS
us.archive.ubuntu.com_ubuntu_dists_natty_universe_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty_universe_i18n_Translation-en%5fUS
us.archive.ubuntu.com_ubuntu_dists_natty-updates_main_binary-amd64_Packages
us.archive.ubuntu.com_ubuntu_dists_natty-updates_main_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty-updates_main_i18n_Translation-en%5fUS
us.archive.ubuntu.com_ubuntu_dists_natty-updates_multiverse_binary-amd64_Packages
us.archive.ubuntu.com_ubuntu_dists_natty-updates_multiverse_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty-updates_multiverse_i18n_Translation-en%5fUS
us.archive.ubuntu.com_ubuntu_dists_natty-updates_restricted_binary-amd64_Packages
us.archive.ubuntu.com_ubuntu_dists_natty-updates_restricted_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty-updates_restricted_i18n_Translation-en%5fUS
us.archive.ubuntu.com_ubuntu_dists_natty-updates_universe_binary-amd64_Packages
us.archive.ubuntu.com_ubuntu_dists_natty-updates_universe_i18n_Translation-en
us.archive.ubuntu.com_ubuntu_dists_natty-updates_universe_i18n_Translation-en%5fUS

Revision history for this message
alexsimps (alexsimps84) wrote :

deleting the files worked good for me...
sudo rm /var/lib/apt/lists/us.archive.ubuntu.com*
sudo apt-get update

Revision history for this message
ResidualBit (residualbit) wrote :

Same issue for me, same sort of situation (as the guy on the hotel network.)

'E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_natty-security_main_i18n_Translation-en, E:The package lists or status file could not be parsed or opened.'

Deleting the files seems to have worked for the main sources, but doesn't take care of third party, medibuntu, chrome etc.

apt-get update gets the main sources, but still fails with the same error do to the others.

Revision history for this message
Jack Stratiff (jackstratiff) wrote :

I removed all the files in /var/lib/apt/lists and did a sudo apt-get update, and I'm still getting the same problem. I'm just installed 11.04 Natty. Please help!

Revision history for this message
Jack Stratiff (jackstratiff) wrote :

I found what may be a solution. I did a sudo nano /etc/apt/sources.list and commented out any sources that were in the universe or multiverse. Then I cleared out the directory /var/lib/apt/lists. Then I ran sudo apt-get update.

On another note, I remember when I ran the installation for natty, I checked a checkbox that said "use universe or use unfree sources" or something like that. Maybe I shouldn't have had that checked.

Revision history for this message
Gary Martin (gm795367-gmail) wrote :

Just fixed this problem on my system. All I had to do is uncheck all repositories and sources. Reload. Check all of your repositories and sources. Reload and you should be back in business

Revision history for this message
Jameson Collins (redthevamp) wrote :

fixed this on my system by doing

Sudo rm /var/lib/apt/lists/*
Sudo rm /var/lib/apt/lists/partial/*
Sudo apt-get update -f

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.