如何在 Ubuntu 20.10 上安装 Java 8?

如何在 Ubuntu 20.10 上安装 Java 8?

我有一台安装了 Ubuntu 20.10 版本的机器。我想安装 Java 8。

java -version
Command 'java' not found, but can be installed with:
sudo apt install default-jre              # version 2:1.11-72, or
sudo apt install openjdk-11-jre-headless  # version 11.0.11+9-0ubuntu2~20.10
sudo apt install openjdk-13-jre-headless  # version 13.0.7+5-0ubuntu1~20.10
sudo apt install openjdk-15-jre-headless  # version 15.0.3+3-1~20.10
sudo apt install openjdk-16-jre-headless  # version 16.0.1+9-1~20.10
sudo apt install openjdk-8-jre-headless   # version 8u292-b10-0ubuntu1~20.10
sudo apt install openjdk-14-jre-headless  # version 14.0.2+12-1

如果我尝试使用命令安装它

sudo apt install openjdk-8-jre-headless

我收到以下错误

Err:1 http://security.ubuntu.com/ubuntu groovy-updates/universe amd64 openjdk-8-jre-headless amd64 8u292-b10-0ubuntu1~20.10
  404  Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u292-b10-0ubuntu1~20.10_amd64.deb  404  Not Found [IP: 91.189.91.39 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

相关内容