Install issues - File has unexpected size and Some index files failed to download

I’m attempting to install Docker on an Ubuntu Linux VM (18.04). I’m following the instructions listed on docs docker com/install/linux/docker-ce/ubuntu/docs docker site.

I’ve installed the necessary packages and repo gpg key. I’ve added the repo location to the /etc/apt/sources.list with:

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

And I have confirmed that it is correct in the file. When I attempt a sudo apt-get update I get the following errors (NOTE: all the URLs below are prefaced with https but because I’m a new user, I can only submit two links in my post so I manually removed them):

Get:6 download docker com/linux/ubuntu bionic/stable amd64 Packages [7,889 B]
Err:6 download docker com/linux/ubuntu bionic/stable amd64 Packages
File has unexpected size (9417 != 7889). Mirror sync in progress? [IP: 54.230.195.76 443]
Hashes of expected file:

  • Filesize:7889 [weak]
  • SHA512:db24e63e6f882530d40047cda5c5cb43a9fd6936d518162135b59f315d9cf0e189453bddd8ee67ed0ef622012da02ecfd5f4e3419cfd116835651b37e4b6a7aa
  • SHA256:fed3e5b48da23965790e21466523ae19c1afe34f31e9005ac343e6b6a4c36d63
  • SHA1:f22380168007fac2e32b2d882a5120a288ed89e1 [weak]
  • MD5Sum:d35d55f528a96c383f4f3c1280cdd214 [weak]
    Release file created at: Sat, 17 Aug 2019 05:05:01 +0000

E: Failed to fetch download.docker.com/linux/ubuntu/dists/bionic/stable/binary-amd64/Packages.bz2 File has unexpected size (9417 != 7889). Mirror sync in progress? [IP: 54.230.195.76 443]
Hashes of expected file:
- Filesize:7889 [weak]
- SHA512:db24e63e6f882530d40047cda5c5cb43a9fd6936d518162135b59f315d9cf0e189453bddd8ee67ed0ef622012da02ecfd5f4e3419cfd116835651b37e4b6a7aa
- SHA256:fed3e5b48da23965790e21466523ae19c1afe34f31e9005ac343e6b6a4c36d63
- SHA1:f22380168007fac2e32b2d882a5120a288ed89e1 [weak]
- MD5Sum:d35d55f528a96c383f4f3c1280cdd214 [weak]
Release file created at: Sat, 17 Aug 2019 05:05:01 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

This looks like it’s something on the repo end unless I’m missing something.

Thanks!

1 Like

I have exactly the same problem. Also a VM running Ubuntu 18.04.

Thanks

I also have the same error for an ARM64 device. Here’s the error:

Get:19 https://download.docker.com/linux/ubuntu bionic/stable arm64 Packages [7,877 B]
Err:19 https://download.docker.com/linux/ubuntu bionic/stable arm64 Packages
  File has unexpected size (9401 != 7877). Mirror sync in progress? [IP: 99.86.58.71 443]
  Hashes of expected file:
   - Filesize:7877 [weak]
   - SHA512:366ba18d677db64aac33d3e4e6bc459c20fd9dccd1323bc4fc63f2bfa79c2658467e968f8745593f2f895cf32c119389e126d0892fbe7b654799516e8fa92315
   - SHA256:4fa1e2cd7d7fddb096ecee942f7caa951c6bbbbb8181ebf71d9d8c1bcf2b7226
   - SHA1:4a78e6090ebc081f69a964665e7aac2623ffec55 [weak]
   - MD5Sum:d8771186c4e8e39051014535ca57f0db [weak]
  Release file created at: Sat, 17 Aug 2019 05:05:01 +0000
Fetched 64.4 kB in 2s (26.9 kB/s)
Reading package lists... Done
E: Failed to fetch https://download.docker.com/linux/ubuntu/dists/bionic/stable/binary-arm64/Packages.bz2  File has unexpected size (9401 != 7877). Mirror sync in progress? [IP: 99.86.58.71 443]
   Hashes of expected file:
    - Filesize:7877 [weak]
    - SHA512:366ba18d677db64aac33d3e4e6bc459c20fd9dccd1323bc4fc63f2bfa79c2658467e968f8745593f2f895cf32c119389e126d0892fbe7b654799516e8fa92315
    - SHA256:4fa1e2cd7d7fddb096ecee942f7caa951c6bbbbb8181ebf71d9d8c1bcf2b7226
    - SHA1:4a78e6090ebc081f69a964665e7aac2623ffec55 [weak]
    - MD5Sum:d8771186c4e8e39051014535ca57f0db [weak]
   Release file created at: Sat, 17 Aug 2019 05:05:01 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

They are working on a fix:

2 Likes

Awesome, thanks for the link!

1 Like

Exact same error here. apt clean, and trying edge rather than stable didn’t help.

I’m not sure if my problem is the same but I can’t install it on CentOS Arm64. If it helps, I can’t download (https://download.docker.com/linux/centos/7/aarch64/stable/repodata/a4c80c0b37f525089891f5ba0712d9ee3e42d56b07fe40bf64f06c761ff71dc2-primary.sqlite.bz2) even though it appears to be there when browsing the parent directory.

Dont think the fix worked, went from
File has unexpected size (9417 != 7889)
to
File has unexpected size (9051 != 7889).

I’m having this problem still as well, what’s the status of the fix?

I had the same issue but is working now
Debian 10

working on ubuntu 18. needed to sudo apt autoremove && sudo apt clean first.