Ubuntu: Trouble downloading packages list due to a “Hash sum mismatch” error



Question:

When I check for updates, I get a "Failed To Download Repository Information" error.

This is what comes up under details:

W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources  Hash Sum mismatch,   E: Some index files failed to download. They have been ignored, or old ones used instead.  


Solution:1

Just remove all the content of /var/lib/apt/lists directory:

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

then run:

sudo apt-get update  


Solution:2

This is a known issue, and is exacerbated for clients behind proxy caches. Some large organisations and ISPs (especially in remote parts of the world) have transparent caches of which you may not be aware.

The fundamental issue is that the apt repository format is subject to race conditions when a mirror is updated. This problem particularly affects repositories that change rapidly, such as the development release.

You can track progress on the fix for this in this bug (please mark yourself as "affects me too" in the bug) and this blueprint. But be aware that it is a complex issue and may take more than one release to resolve.


Solution:3

The easiest way to fix this is:

sudo apt-get clean  sudo apt-get update  


Solution:4

I still had the problem after removing the directories and doing sudo apt-get update.
Only the following step solved my problem:

sudo sed -i -re 's/\w+\.archive\.ubuntu\.com/archive.ubuntu.com/g' /etc/apt/sources.list  

I don't know if this is the right way of fixing it...
I've found the solution here.


Solution:5

This can happen when your mirror is not up to date or serving errors from being overloaded. You can either wait a while and try again, or switch to another mirror:


Solution:6

The only solution that worked for me is from unix.stackexchange.

It happens because there's a known bug it apt, and the solution is to update with a different compression method, so the files load correctly and the checksum succeeds.

Give this a try:

sudo rm -rf /var/lib/apt/lists/partial  sudo apt-get update -o Acquire::CompressionTypes::Order::=gz  

(thanks @brook_hong from the comments for the rm part)


Solution:7

The following commands may solve your issue.

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

and then

sudo apt-get update && sudo apt-get upgrade  

it will solve your problem. I also faced the same problem but the above commands solved the problem for me. So give them a try.

Solution reference


Solution:8

If you're behind a proxy, then create a file named 99fixbadproxy in /etc/apt/apt.conf.d/:

sudo gedit /etc/apt/apt.conf.d/99fixbadproxy  

Paste this into 99fixbadproxy and save it:

Acquire::http::Pipeline-Depth 0;  Acquire::http::No-Cache true;  Acquire::BrokenProxy    true;  

Now run the update command:

sudo apt-get update  


Solution:9

I had the exact same problem and all solutions provided using the terminal did not help.

For me, it was by going into:

Settings â†' Software & Updates â†' Other software: Uncheck all the boxes and press close.

It starts reloading the repos and updating. When I enter:

sudo apt-get update  

After that, there was no problem at all. I'm using Ubuntu 13.10.


Solution:10

I don't know that it's proper solution or not, but I did the following and the error message's gone:

After typing sudo apt-get update in terminal, it gives me the names of some packages which cause the error then I did the following:

Update manager(software update) â†' Setting â†' Configure Software Sources â†' Other software[tab] â†' Uncheck the packages

After pressing the "close" bottom, update manager started to check for update automatically again and I saw this message:"the software on this computer is up to date. Last checked 2 seconds ago."

Kubuntu 12.04


Solution:11

I have resolved all the packages not being installed by running

sudo apt-get install PACKAGENAME

for each of the packages. They are now installed and the "Hash Sum mismatch" error has gone.


Solution:12

I had a similar problem and solved it by opening theh application "Software & Updates" and, in "Ubuntu Software" tab, changing the value of "Download from" (in that drop-down list, try to select, for example, Main Server if it was not like that).


Solution:13

As follow @robie-basak, I used apt-cacher-ng as mirror caching. So I Remove the proxy and the problem solved.

I remove the proxy in file /etc/apt/apt.conf.d/01proxy:

#Acquire::http::Proxy "http://xxx.xx.xx.xx:4321";  

Then need to:

sudo rm -rf /var/lib/apt/lists/*  sudo aptitude update  sudo aptitude upgrade  


Solution:14

I had the exact same problem and all solutions provided using the terminal did not help. For me, it was by going into:

Settings â†' Software & Updates â†' Ubuntu software: Download from: Change local to main server

It starts reloading the repos and updating. When I enter:

sudo apt-get update After that, there was no problem at all. I'm using Ubuntu 14.04.4 LTS.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »