Installing on Ubuntu 16.10 (Yakkety): Hash sum mismatch

I’m trying to install docker-ce on Ubuntu 16.10. After adding the repo and Docker’s GPG key, I get this when updating the package index:

E: Failed to fetch https://download.docker.com/linux/ubuntu/dists/yakkety/stable/binary-amd64/Packages.bz2 Hash Sum mismatch
Hashes of expected file:
- Checksum-FileSize:1965 [weak]
- SHA512:7a6050c715c0461a92b9f0841cd91bfe34dbdfe83b0efd2b473982aae9f2f8fa05d2235782d58ddc6e33c822a627bdf4ecd2d4967b31bd32c86a2620d5e94fc4
- SHA256:b1516c7d35130f3a4ae419c927fccde36aa599e77d6ce00a819cc17968b78119
- SHA1:685ede537135243eae895d87527802a250cf9eb5 [weak]
- MD5Sum:2d58bced6cb5696a36827aa5aa89129b [weak]
Hashes of received file:
- SHA512:c8c46e5d85ce398dfabd1f4ec18d1158d4dc3b43c9f6f90c57f2ac425c7b88c736c08806269d4481f568c152b8bf50f7d390a7b0bf79d7507204895beb03da6c
- SHA256:6210998cb3b63e59d16577c3fc13313526d8b65275be373639c84728786909c0
- SHA1:588b2f711a753243a9d8ecf40e7c5959340dac47 [weak]
- MD5Sum:5ff5933b09b7d26f915dec68aa6fedcf [weak]
- Checksum-FileSize:1961 [weak]
Last modification reported: Fri, 08 Jun 2018 18:03:58 +0000
Release file created at: Fri, 14 Jul 2017 09:11:49 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

The hash sum error looks very similar to these issues

https://github.com/moby/moby/issues/23203 (and /issues/30207…I can only post two links)

The error seems like it would be a problem with the packages, and issue 23203 seems to confirm it in the prior case. I tried the following workaround from the second link to no avail:

sudo apt-get update -o Acquire::CompressionTypes::Order::=gz
sudo apt-get upgrade -y
sudo apt-get update

Any ideas on what I can do? It seems to me that the packages themselves are just bad, but I don’t know how I can get that fixes.

Colleague a couple days ago had a Hash Sum Mismatch with a package in their apt-cacher setup. The solution was to clear partial packages and/or package state from the cacher. Might be the same general solution for you; clear apt’s partial packages and/or package state.