7

I am getting the following error while running apt update:

E: Failed to fetch https://packages.microsoft.com/ubuntu/16.04/prod/dists/xenial/main/binary-amd64/Packages.bz2 Hash Sum mismatch

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

Before someone thinks that this is already answered, I have tried all solutions which are given but none of them worked: Solutions I tried :

#solution1
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

#solution2
sudo apt-get clean
sudo apt-get update

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

#solution4
sudo sed -i -re 's/\w+\.archive\.ubuntu\.com/archive.ubuntu.com/g' /etc/apt/sources.list
rhughes
  • 9,257
  • 11
  • 59
  • 87
Ashwani
  • 1,340
  • 1
  • 16
  • 34
  • Kindly refer to this https://askubuntu.com/questions/41605/trouble-downloading-packages-list-due-to-a-hash-sum-mismatch-error – Prabhjot Singh Kainth Dec 13 '19 at 12:25
  • @PrabhjotSinghKainth any answers there that are *not* in Ashwani's list of "solutions I tried"? I am also suddenly seeing this error when building docker images from a Dockerfile which worked just a few days ago. – Paul Roub Dec 13 '19 at 16:24
  • 2
    Certainly worth pointing out that the packages were updated overnight - https://packages.microsoft.com/ubuntu/16.04/prod/dists/xenial/main/binary-amd64/ – Paul Roub Dec 13 '19 at 16:29

1 Answers1

1

Via Microsoft support, they identified a problem with their linux repo. It has since been fixed/rolled back. I was experiencing the same issue, but now it is working for me again.

ponolson
  • 46
  • 5