Linux – apt-get: hash sum mismatch

aptlinux-mint

Running "sudo apt-get update" results in:

W: Failed to fetch gzip:/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_saucy-security_main_binary-i386_Packages Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_saucy-security_universe_binary-i386_Packages Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_saucy_universe_binary-amd64_Packages Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_saucy_main_binary-i386_Packages Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_saucy_universe_binary-i386_Packages Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.

I have tried to run:

sudo rm -R /var/lib/apt/lists/partial/*

sudo rm -fR /var/lib/apt/lists/*

sudo apt-get clean

I have also tried the Fix MergeList problems button of the Software Sources tool. I am running Linux Mint 16 Cinnamon 64 bits.

In the Update Manager I can see many updates that I should install but attempting to install them results in:

E: Unable to parse package file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_saucy-updates_universe_i18n_Translation-en (1)
E: Problem opening /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_saucy-security_main_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.

Any ideas?

Best Answer

Those messages are normally due to failures during the download of the list or a glitch in the mirror. You can fix it by removing the faulty lists:

$ sudo rm /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_saucy_universe_binary-amd64_Package

and updating with sudo apt-get update. If it still happens use another mirror or wait for a bit first.

Related Question