“sudo apt-get install openjdk-8-jre / sudo apt-get install openjdk-8-jdk”后 Java 未安装

“sudo apt-get install openjdk-8-jre / sudo apt-get install openjdk-8-jdk”后 Java 未安装

我收到以下错误消息:

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.15+10-0ubuntu0.20.04.1
sudo apt install openjdk-13-jre-headless  # version 13.0.7+5-0ubuntu1~20.04
sudo apt install openjdk-16-jre-headless  # version 16.0.1+9-1~20.04
sudo apt install openjdk-17-jre-headless  # version 17.0.3+7-0ubuntu0.20.04.1
sudo apt install openjdk-8-jre-headless   # version 8u312-b07-0ubuntu1~20.04

我该如何正确安装它?

相关内容