5

I had to rebuild a docker container this past week, and as part of a 16.04 container creation, it does an apt-get install openjdk-8-jdk which fails with a 404 error.

Switching to apt-get install default-jdk tries to pull the same package and, likewise, fails with a 404 error. See below. As is normal practice, I run apt-get update before trying this.

Get:168 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxi6 amd64 2:1.7.6-1 [28.6 kB]
Get:169 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxrender1 amd64 1:0.9.9-0ubuntu1 [18.5 kB]
Err:170 http://security.ubuntu.com/ubuntu xenial-security/main amd64 openjdk-8-jre-headless amd64 8u151-b12-0ubuntu0.16.04.2
  404  Not Found [IP: 91.189.88.162 80]
Get:171 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 ca-certificates-java all 20160321ubuntu1 [12.5 kB]
Err:170 http://security.ubuntu.com/ubuntu xenial-security/main amd64 openjdk-8-jre-headless amd64 8u151-b12-0ubuntu0.16.04.2
  404  Not Found [IP: 91.189.88.162 80]

Did the 16.04 repos get all wonky all of a sudden?

Thanks much!

Byte Commander
  • 110,243
Eric63
  • 91

3 Answers3

7

Did you do sudo apt-get update recently? If not, do that, then try again.

The 404 error is that it's hunting a specific version of the package that is not available on the repos anymore, and this usually happens when your repository 'state' information is out of date. Usually a call to sudo apt-get update will fix that problem, and then you can retry the sudo apt-get install command you were trying to run again.

Thomas Ward
  • 78,878
0

Thomas, the repos have been fixed. Rerunning sudo apt-get update now -- I mean, after Thursday, 4/12/2018, resolves the issue.

Thanks much!

Eric63
  • 91
0

I'm on WSL2 and following these instructions was required to complete the installation.

Apparently the WSL instance was not time-synced with the real host time, causing problems with apt-get update && install.

funder7
  • 196