Apt trying to fetch versions not available in archive.ubuntu.com/ubuntu/pool/main

I keep getting failed to fetch errors from the primary Ubuntu repository for gcc and related. I have run sudo apt update --fix-missing and sudo apt upgrade and the errors remain the same.

Looking at I can verify that a) the server is responding properly and b) there are archives there to fetch, just not the versions that apt is looking for.

Why is apt looking for different versions? How do I reset or rebuild whatever list apt is using for version numbers?

Err:6 focal-updates/main amd64 libc-dev-bin amd64 2.31-0ubuntu9.2 404 Not Found [IP: 185.125.190.39 80]
Ign:7 focal-updates/main amd64 linux-libc-dev amd64 5.4.0-100.113
Err:8 focal-updates/main amd64 libc6-dev amd64 2.31-0ubuntu9.2 404 Not Found [IP: 185.125.190.39 80]
Err:9 focal-updates/main amd64 libc6-dbg amd64 2.31-0ubuntu9.2 404 Not Found [IP: 185.125.190.39 80]
Err:1 focal-updates/main amd64 gcc-9-base amd64 9.3.0-17ubuntu1~20.04 404 Not Found [IP: 185.125.190.39 80]
Err:2 focal-updates/main amd64 cpp-9 amd64 9.3.0-17ubuntu1~20.04 404 Not Found [IP: 185.125.190.39 80]
Err:3 focal-updates/main amd64 libasan5 amd64 9.3.0-17ubuntu1~20.04 404 Not Found [IP: 185.125.190.39 80]
Err:4 focal-updates/main amd64 libgcc-9-dev amd64 9.3.0-17ubuntu1~20.04 404 Not Found [IP: 185.125.190.39 80]
Err:5 focal-updates/main amd64 gcc-9 amd64 9.3.0-17ubuntu1~20.04 404 Not Found [IP: 185.125.190.39 80]
Err:7 focal-updates/main amd64 linux-libc-dev amd64 5.4.0-100.113 404 Not Found [IP: 185.125.190.39 80]
Unable to correct missing packages.
E: Failed to fetch 404 Not Found [IP: 185.125.190.39 80]
E: Failed to fetch 404 Not Found [IP: 185.125.190.39 80]
5

1 Answer

  1. Try removing content of /var/lib/apt/lists/ - may contain some broken/outdated package lists. After sudo apt update should be as good as new.
  2. Messages about release file being "not valid yet" may be because of a clock skew. Make sure your clock is set correctly.
  3. When you get messages about conflicting packages try to remove them and reinstall afterwards.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like