0

When running apt-get update I receive checksum errors on some of the sources packages. I also note that apt-get clean cannot resolve my local host name.

Please assist.

Arronical
  • 19,893
Hendré
  • 759
  • Add the errors in your question. We need to know which repository it was – Anwar Oct 31 '16 at 12:39
  • I get a hash sum mismatch on http://us.archive.ubuntu.com/ubuntu/dist/precise/main/source/Sources and several other – Hendré Oct 31 '16 at 13:49
  • 3
    Please add the complete error in the question by editing it – Anwar Oct 31 '16 at 13:50
  • I do not have ssh access to the machine. Can't update my packages. No copy and paste. The error is "Failed to fetch...repository... Hash sum mismatch" – Hendré Oct 31 '16 at 13:53
  • 1
    Tried solutions from this? http://askubuntu.com/questions/41605/trouble-downloading-packages-list-due-to-a-hash-sum-mismatch-error – Anwar Oct 31 '16 at 13:57
  • No. Not my error. – Hendré Oct 31 '16 at 14:01
  • Try this following command may solve your issue $ sudo sed -i 's/[a-z][a-z].archive.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list – Naresh S Nash Oct 26 '16 at 08:46
  • 1
    Maybe this link helps :- http://unix.stackexchange.com/questions/116641/how-do-you-fix-apt-get-update-hash-sum-mismatch – Gautam Vashisht Nov 04 '16 at 06:00

2 Answers2

1

This could occur due to issues with the mirror you are using (in this case us.archive.ubuntu.com) Sometimes these issues are quickly resolved and simply trying again is effective. If not you need to edit your /etc/apt/sources.lst file and replace us.archive.ubuntu.com with another up-to-date mirror from this list or perhaps the main server at archive.ubuntu.com

then run sudo apt-get clean (which has nothing to do with your hostname) to clean the apt cache

Then proceed as normal with:

sudo apt-get update; sudo apt-get upgrade

Elder Geek
  • 36,023
  • 25
  • 98
  • 183
0

This will remove the package lists and rebuild them. Sometimes they get corrupted (they are building with deltas) during syncing the mirrors.

sudo rm /var/lib/apt/lists/*
sudo apt-get update
jet
  • 7,274