Sunday, February 5, 2012

Merge list error while running apt-get update or apt-cache search

This is a nasty error that can occur while you are using the Ubuntu package manager.  It looks something like this:
E:Encountered a section with no Package: header,
E:Problem with MergeList /var/lib/apt/lists /us.archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages,
E:The package lists or status file could not be parsed or opened.
This results because the package manager is unable to merge the newly determined lists with existing temporary ones in /var/lib/apt/lists.

Solution: This can be fixed by deleting the temporary lists:
sudo rm /var/lib/apt/lists/* -vf
and re-building the database:
sudo apt-get update


Post a Comment