Score:0

failed to fetch 403 forbidden & 404 not found on ubuntu focal

it flag

Trying to install various packages using apt but face 403 & 404 error codes while installing them even though I have 2 other devices that fetches packages normally (not same device type).

Some information:

  1. Laptop is old with a Pentium x86_64
  2. Tried to switch sources list from software & updates (Tried main, US & mirrors) but to mo avail).
  3. I am facing same problem with firefox, openjdk-8-jdk and many others.
  4. faced the problem with python3-pip but running sudo apt update && sudo apt install python3-pip after switching to mirrors seemed to solve it (yet it didn't for the rest).
  5. Tried different ISP but to no avail.
  6. Tried $ sudo apt install --fix-missing && sudo apt install openjdk-8jdk but gives the same output.
  7. Tried jdk11 but gives exactly same error output.

This is the full log:

$ sudo apt install openjdk-8-jdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  ca-certificates-java fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni libgif7 libice-dev libpthread-stubs0-dev libsm-dev libx11-dev
  libxau-dev libxcb1-dev libxdmcp-dev libxt-dev openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless x11proto-core-dev x11proto-dev xorg-sgml-doctools
  xtrans-dev
Suggested packages:
  default-jre libice-doc libsm-doc libx11-doc libxcb-doc libxt-doc openjdk-8-demo openjdk-8-source visualvm icedtea-8-plugin fonts-ipafont-gothic fonts-ipafont-mincho
  fonts-wqy-microhei fonts-wqy-zenhei fonts-indic
The following NEW packages will be installed:
  ca-certificates-java fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni libgif7 libice-dev libpthread-stubs0-dev libsm-dev libx11-dev
  libxau-dev libxcb1-dev libxdmcp-dev libxt-dev openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless x11proto-core-dev x11proto-dev
  xorg-sgml-doctools xtrans-dev
0 upgraded, 22 newly installed, 0 to remove and 17 not upgraded.
Need to get 39.5 MB/43.5 MB of archives.
After this operation, 162 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.ubuntu.com/mirrors.txt Mirrorlist [528 B]                                                                                                         
Ign:5 http://ubuntu.mirror.ac.za/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04                                                      
Ign:2 http://ubuntu.dts.mg/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04                                                   
Ign:3 http://ubuntu.dts.mg/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04                                                            
Ign:4 http://ubuntu.dts.mg/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04                                                   
Ign:3 http://ubuntu.mirror.ac.za/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04                                                      
Ign:4 http://ubuntu.mirror.ac.za/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04                                             
Ign:3 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04                                                       
Ign:4 https://mirrors.united.cd/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04                                              
Ign:3 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04                                                  
Ign:4 https://ubuntu-mirror.cloud.mu/ubuntu-ports focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04                                   
Ign:5 https://mirror.marwan.ma/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04                                                        
Ign:3 https://mirror.marwan.ma/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04
Ign:5 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:3 https://mirrors.united.cd/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04
Ign:5 https://mirrors.united.cd/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04                                                       
Ign:3 https://ubuntu-mirror.cloud.mu/ubuntu-ports focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04                          
Ign:2 https://mirror.wiru.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:5 https://mirror.wiru.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:4 http://deb-mirror.habari.co.tz/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:3 http://deb-mirror.habari.co.tz/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04
Ign:5 http://deb-mirror.habari.co.tz/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:4 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:4 https://mirror.marwan.ma/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:4 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:4 https://mirror.wiru.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:3 https://mirror.hostafrica.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:3 https://mirror.wiru.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04
Ign:4 http://mirror.aptus.co.tz/pub/ubuntuarchive focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:3 http://ubuntu.mirror.rain.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04
Ign:4 http://ubuntu.mirror.rain.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:5 http://download.nust.na/pub/ubuntu/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:5 https://mirror.hostafrica.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:5 http://ubuntu.dts.mg/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:5 http://mirror.lnx-solutions.com/ubuntu focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:3 http://download.nust.na/pub/ubuntu/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04
Ign:4 http://download.nust.na/pub/ubuntu/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
Ign:5 https://ubuntu-mirror.cloud.mu/ubuntu-ports focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:5 https://ubuntu-mirror.cloud.mu/ubuntu-ports focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:5 https://ubuntu-mirror.cloud.mu/ubuntu-ports focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
Ign:4 http://mirror.lnx-solutions.com/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
Err:4 https://mirror.hostafrica.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04
  404  Not Found [IP: 41.188.34.241 80]
Ign:3 http://mirror.aptus.co.tz/pub/ubuntuarchive focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04
Err:2 https://ubuntu-mirror.cloud.mu/ubuntu focal-updates/universe amd64 openjdk-8-jre-headless amd64 8u312-b07-0ubuntu1~20.04
  404  Not Found [IP: 41.188.34.241 80]
Err:5 https://ubuntu-mirror.cloud.mu/ubuntu-ports focal-updates/universe amd64 openjdk-8-jdk amd64 8u312-b07-0ubuntu1~20.04
  404  Not Found [IP: 155.232.191.230 80]
Err:3 http://mirror.lnx-solutions.com/ubuntu focal-updates/universe amd64 openjdk-8-jre amd64 8u312-b07-0ubuntu1~20.04
  404  Not Found [IP: 41.188.34.241 80]
Fetched 528 B in 51s (10 B/s)
E: Failed to fetch https://mirrors.united.cd/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u312-b07-0ubuntu1~20.04_amd64.deb  404  Not Found [IP: 41.188.34.241 80]
E: Failed to fetch http://mirror.lnx-solutions.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u312-b07-0ubuntu1~20.04_amd64.deb  404  Not Found [IP: 41.188.34.241 80]
E: Failed to fetch https://mirror.hostafrica.co.za/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk-headless_8u312-b07-0ubuntu1~20.04_amd64.deb  404  Not Found [IP: 41.188.34.241 80]
E: Failed to fetch http://mirror.aptus.co.tz/pub/ubuntuarchive/pool/universe/o/openjdk-8/openjdk-8-jdk_8u312-b07-0ubuntu1~20.04_amd64.deb  404  Not Found [IP: 155.232.191.230 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

David avatar
cn flag
What version of Ubuntu are you using?
Omar Shawky avatar
it flag
@David focal fosa
Omar Shawky avatar
it flag
@David I tried with a live ubuntu to install it, first time it gave me the same error, second time (after `sudo apt update` it installed successfully) yet it isn't doing the same with the current system installation
user535733 avatar
cn flag
Tested with `https://mirrors.united.cd/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u312-b07-0ubuntu1~20.04_amd64.deb` which indeed does not exist on that server. Your local package database is stale and needs to be updated. Run `sudo apt update` to do so, and read your output carefully for errors that would prevent updating your local database. This is precisely why most reputable instructions begin with an apt update.
Omar Shawky avatar
it flag
@user535733 no doubts i did +100 times `sudo apt update`
user535733 avatar
cn flag
Did you read the `apt update` output for errors? We don't know, since it's not in your question.
Omar Shawky avatar
it flag
@user535733 not a single error
Terrance avatar
id flag
"Err:4 mirror.hostafrica.co.za/ubuntu focal-updates/universe amd64 openjdk-8-jdk-headless amd64 8u312-b07-0ubuntu1~20.04 404 Not Found [IP: 41.188.34.241 80]" is an error of an unreachable repo. Try different mirrors in the Software & Updates.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.