While running the update at Ubuntu 14.04 LTS (Trusty Tahr). The following error is being encountered:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-i386/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-i386/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/Translation-en  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/i18n/Translation-en  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
share|improve this question

closed as off-topic by Nikolay Kostov, Undo Jun 28 '16 at 20:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – Nikolay Kostov, Undo
If this question can be reworded to fit the rules in the help center, please edit the question.

    
This site is for programming questions. We are not general software tech support. – Marc B Nov 25 '14 at 21:41
    
askubuntu.com is better place for this question – number5 Nov 26 '14 at 1:08
    
Got it. Moved to askubuntu.com :) – Shivam Bajpai Nov 26 '14 at 1:23
    
FWIW, I just hit this exact error when bringing up a 14.04 based VM. Simply restarting the VM setup from scratch got past the problem, but it does seem there's potential for an ephemeral failure here. It'd be nice either for Ubuntu to isolate and fix this, or else to understand what's going on so provisioning scripts can work around it. – John Whitley Dec 9 '14 at 18:35

This worked for me:

rm /var/lib/apt/lists/* -vf
apt-get update

Hope it helps someone else. Cheers!

share|improve this answer
2  
sudo rm -rf /var/lib/apt/lists/* -vf – markhorrocks Jul 7 '15 at 12:56

There are many problem due to which this issue has come. Some of then are :

  1. Any entry in you apt.list is not working. You or any application has created a wrong entry.
  2. apt repository are not currently working.
  3. Corrupt in /var/lib/apt/lists/ folder.

So for both of them there are different solution, if you didn't know the exact problem then follow following steps:

  1. Use another mirrors of apt. In ubuntu there is file name /etc/apt/sources.list and folder containing some files in /etc/apt/sources.list.d/. So, from there you can change use any other mirrors of apt. Like you can change your India repository to US repository, etc. by editing these files.
  2. There is another possibility too that you having any other repository link (third party) which is not responding for the moment. So, you can also delete them from the above given files. You can also remove all third party repositories from list

    rm -rf /etc/apt/sources.list.d/*

  3. Remove all contents from /var/lib/apt/lists/

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

share|improve this answer
1  
Thanks @varun-palekar, that worked for me. – AJN Dec 12 '16 at 1:35

Something is up with the us.archive.ubuntu.com server.

I fixed it by changing all of the us.archive.ubuntu.com urls to in.archive.ubuntu.com in /etc/apt/sources.list

I used vim with find and replace like this:

sudo vim /etc/apt/sources.list
:%s/us.archive/in.archive/g
:wq
share|improve this answer

I had this issue on my ubuntu on virtualbox before. I tried all above but that won't help.

When I worked on other backup script and I recognized that my server had incorrect date/time. I have change that and the apt-get update works like a charm.

share|improve this answer

The following command should work

sed -i -re 's/\w+\.archive\.ubuntu\.com/archive.ubuntu.com/g' /etc/apt/sources.list
share|improve this answer
    
Thanks, the answer helps me to fix problem – utzcoz Jul 3 '17 at 9:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.