Error during apt update on Ubuntu 20.04 “File has unexpected size”

Hi,

I get the following message when I try to run “apt update”.

Err:12 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  Packages
  File has unexpected size (1127072 != 1126689). Mirror sync in progress? [IP: 152.199.39.144 443]
  Hashes of expected file:
   - Filesize:1126689 [weak]
   - SHA256:7cee2584ca6d97b2f07018ba4f9c3c473fb4e299ed170968a1f8c99c090cc59f
   - SHA1:4ee24fac5518a3fcc3702590a0dab32c95484c54 [weak]
   - MD5Sum:593faff511765d11055c9919bf2e3bf8 [weak]
  Release file created at: Thu, 17 Aug 2023 19:03:05 +0000

I have tried “apt clean”, “rm -r /var/cache/apt /var/lib/apt/lists” and re-import the apt key, but still get the same error.
Is anything I should do to fix it?

I noticed that the cuda repository has been updated yesterday, so maybe the problem is on the repository side?

Duplicate issue here: Failed to download artifacts from https://developer.download.nvidia.com/ (Mirror sync in progress?)

Please fix this, as its blocking work in the AV Division.

4 2.839 E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/Packages.gz File has unexpected size (1127072 != 1126689). Mirror sync in progress? [IP: 152.195.19.142 443]
#4 2.839 Hashes of expected file:
#4 2.839 - Filesize:1126689 [weak]
#4 2.839 - SHA256:7cee2584ca6d97b2f07018ba4f9c3c473fb4e299ed170968a1f8c99c090cc59f
#4 2.839 - SHA1:4ee24fac5518a3fcc3702590a0dab32c95484c54 [weak]
#4 2.839 - MD5Sum:593faff511765d11055c9919bf2e3bf8 [weak]
#4 2.839 Release file created at: Thu, 17 Aug 2023 19:03:05 +0000
#4 2.839 E: Some index files failed to download. They have been ignored, or old ones used instead.

process “/bin/sh -c apt-get update” did not complete successfully: exit code: 100
docker build failed: returned 0

1 Like

The metadata mismatch issue is now resolved.
See also Unable to add apt repo - Mirror sync in progress
Ping @jroach

I was able to complete my builds.
Thank you.