I have the same issue as this forum Unable to run apt update, file has unexpected size, but seems that this one is solved almost one year ago. However, I just met this error from the first time just last week, and until now, I’m still not be able to run apt update properly and got the following error log message
Get:1 file:/var/cuda-repo-ubuntu2204-12-2-local InRelease [1,572 B]
Get:1 file:/var/cuda-repo-ubuntu2204-12-2-local InRelease [1,572 B]
Hit:2 https://download.docker.com/linux/ubuntu jammy InRelease
Hit:3 https://apt.foxglove.dev/studio stable InRelease
Get:4 https://isaac.download.nvidia.com/isaac-ros/release-3 jammy InRelease [13.6 kB]
Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease
Get:6 https://isaac.download.nvidia.com/isaac-ros/release-3 jammy/release-3.0 amd64 Packages [25.8 kB]
Hit:7 http://packages.osrfoundation.org/gazebo/ubuntu-stable jammy InRelease
Hit:8 http://packages.ros.org/ros2/ubuntu jammy InRelease
Hit:9 http://jp.archive.ubuntu.com/ubuntu jammy InRelease
Hit:10 http://jp.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:11 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:12 http://robotpkg.openrobots.org/packages/debian/pub jammy InRelease
Hit:13 http://jp.archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:14 https://isaac.download.nvidia.com/isaac-ros/release-3 jammy/main amd64 Packages
Get:14 https://isaac.download.nvidia.com/isaac-ros/release-3 jammy/main amd64 Packages [27.7 kB]
Err:14 https://isaac.download.nvidia.com/isaac-ros/release-3 jammy/main amd64 Packages
File has unexpected size (14 != 27666). Mirror sync in progress? [IP: 23.62.20.57 443]
Hashes of expected file:
- Filesize:27666 [weak]
- SHA256:11ff80cd12a3fdccdb463d2ca68a5cc6d8b709f8f67d5141461439bc6f310f4f
- SHA1:71f7956fa65173506732a2c8bd7db8c94e1f3b07 [weak]
- MD5Sum:a56929479ae5977d2cac84d35f464cc4 [weak]
Release file created at: Mon, 12 May 2025 18:10:47 +0000
Hit:15 http://robotpkg.openrobots.org/packages/debian/pub jammy Release
Fetched 13.6 kB in 1s (15.2 kB/s)
Reading package lists... Done
E: Failed to fetch https://isaac.download.nvidia.com/isaac-ros/release-3/dists/jammy/main/binary-amd64/Packages.bz2 File has unexpected size (14 != 27666). Mirror sync in progress? [IP: 23.62.20.57 443]
Hashes of expected file:
- Filesize:27666 [weak]
- SHA256:11ff80cd12a3fdccdb463d2ca68a5cc6d8b709f8f67d5141461439bc6f310f4f
- SHA1:71f7956fa65173506732a2c8bd7db8c94e1f3b07 [weak]
- MD5Sum:a56929479ae5977d2cac84d35f464cc4 [weak]
Release file created at: Mon, 12 May 2025 18:10:47 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
Im using Ubuntu 22.04 with ros2 humble installation