⌚ September 18, 2014
Ubuntu Software System and Synaptic would both close immediately. No system updates or software installations or removals could be performed even though the system ran fine.
Attempting to update from the terminal also returned a wealth of errors that always reported a Problem with MergeList error.
Update September 24, 2014: This issue has apparently been fixed after performing a recent system update. Several programs, including apt-utils, have been updated in the repository, and the MergeList and Hash Sum mismatch problems no longer occur. The cause of this problem was most likely a software issue that has now been corrected.
Here is what this error looks like when attempting to open Synaptic:
Xubuntu 14.04 always boots with error dialogs. Here is a dialog showing details as result of the error:
At one point, Xubuntu returned an additional error dialog with the message, “This is a serious error.”
Running sudo apt-get update produces multiple “Hash Sum mismatch” errors.
This occurred consistently across multiple systems. I suspect it had something to do with custom repository editing, but it always updated fine until today despite my tweaking. Why now, all of a sudden? And no, “I didn’t change anything!” (Programmers will understand that joke.) After some research, it turns out that the MergeList problem has to do with a corrupted control file. Is there a fix?
Indeed, there is. It appeared that I was not alone, and others already discovered a somewhat working solution. Entering these commands in order resolved the issue temporarily:
sudo rm -rf /var/lib/apt/lists sudo mkdir -pv /var/lib/apt/lists/partial sudo apt-get update sudo apt-get upgrade
CAUTION: Be careful with the sudo rm -rf command! It forcefully and recursively deletes everything from the specified directory, so double check that you are deleting the proper directory. You can delete much of your Linux installation if misused.
While those commands work, I found that this was all that was needed for my system:
sudo rm -r /var/lib/apt/lists sudo apt-get update
The effect was the same, and it eliminated the dangerous sudo rm -rf command. Neither was there any need to recreate the /var/lib/apt/lists/partial directory structure. Linux Mint 17 updated the same as always. For a one-liner, I ran this with equal success:
sudo rm -r /var/lib/apt/lists && sudo apt-get update
sudo rm -r /var/lib/apt/lists && sudo apt-get update && sudo rm -r /var/lib/apt/lists
The system updated properly. Ubuntu Software Center, Synaptic, and the terminal all performed software management as usual. However, I needed to execute these commands on each system separately — both real and virtual.
However, this solution is not permanent. System reboots will restore the problem and cause software management not to work again. This means you must enter the commands again to delete /var/lib/apt/lists before performing a system update or installing software.
Thinking that the repository itself might be an issue, I tried changing repository sources for Linux Mint 17, but the problem persisted. Apparently, my settings could be at fault somewhere despite the fact that they have not been tinkered with.
Time will no doubt reveal the answer, but in the meantime this solution works as a way to install software and perform updates.
Update: I believe that I have narrowed down the cause of this issue since I can reproduce the problem consistently on every Linux system I have updated. It appears that the repositories contain updated versions of the apt tools, such as apt-get, and these tools are causing the MergeList problem.
Here is the procedure: On a non-updated system, apt-get functions properly. Running sudo apt-get update completes successfully without any errors. So far so good. Running sudo apt-get upgrade updates the software like it always does. Again, so far so good. But running sudo apt-get update again after the update returns the Hash sum mismatch and MergeList errors. Ubuntu Software Center and Synaptic close immediately due to the MergeList error, and apt-get returns a Hash sum mismatch error.
Each time sudo apt-get update runs, it will require that the /var/lib/apt/lists files be deleted before it will run again without errors.
This happened on every single Linux system I updated recently, and I tried updating others to see what would happen. After the latest updates, apt-get no longer works properly unless /var/lib/apt/lists is deleted. It could be that this is a problem with the updated apt tools and not with my system, but that is only a theory for now.
Update 2: After reading older bug reports that described the same problem, it appears this issue has occurred in the past. The symptoms and solution described in those reports are the same as what I am experiencing now, so it could be that there is a bug of some sort with the updated apt tools. But it could also be a bad repository or improper settings on my part.
Update 3: One temporary, one-time-per-boot trick is to add this line to /etc/rc.local:
rm -r /var/lib/apt/lists
Open the file /etc/rc.local with any text editor (sudo gedit /etc/rc.local, for example) and add the line before the last exit 0 line. There is no need to prepend the command with sudo since this file runs as root upon system boot. This will delete the /var/lib/apt/lists directory recursively upon system startup so we can perform at least one apt-get update without a Hash Sum mismatch error. However, once sudo apt-get update runs, things return to the problem state, and we will need to delete /var/lib/apt/lists again before running sudo apt-get update again.
Update 4: September 24, 2014 [Solved]: Apparently, the issue was a buggy apt-utils or some similar software. After a recent system update today, apt-utils was updated (along with other programs), and the system now functions properly. No more Hash Sum mismatch errors appear. sudo apt-get update works properly like it has in the past. There is no longer any need to delete /var/lib/apt/lists. All systems tested function fine after the new update.