默认 JRE 8 未安装

默认 JRE 8 未安装

我正在尝试为 Minecraft 安装 Open JDK 的 JRE 8。但它不起作用。我已经尝试了所有方法。

我正在运行 Ubuntu 18.04 LTS

有人能帮我吗?

(xenial)reizu@localhost:~$ sudo apt-get update
[sudo] password for reizu: 
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://packages.microsoft.com/repos/edge stable InRelease                
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease                     
Hit:4 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu bionic InRelease           
Hit:5 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Hit:7 http://repository.spotify.com stable InRelease                     
Reading package lists... Done                      
(xenial)reizu@localhost:~$ sudo apt-get autoclean
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Del libc6 2.31-9 [2,753 kB]
Del libcom-err2 1.46.1-1 [74.1 kB]
Del libnss-nis 3.1-4 [26.5 kB]
Del libcom-err2 1.46.1-1 [73.7 kB]
Del libkrb5-3 1.18.3-4 [390 kB]
Del libgssapi-krb5-2 1.18.3-4 [165 kB]
Del libtirpc3 1.3.1-1 [83.6 kB]
Del libatk-wrapper-java 0.38.0-2 [64.5 kB]
Del libnss-nisplus 1.3-4 [21.7 kB]
Del libc-bin 2.31-9 [814 kB]
Del libjpeg62-turbo 1:2.0.5-2 [149 kB]
Del libgssapi-krb5-2 1.18.3-4 [176 kB]
Del libc6 2.31-9 [2,812 kB]
Del libkeyutils1 1.6.1-2 [15.4 kB]
Del libssl1.1 1.1.1i-3 [1,548 kB]
Del libidn2-0 2.3.0-5 [86.1 kB]
Del openjdk-11-jre 11.0.10+9-1 [34.1 kB]
Del openjdk-11-jre-headless 11.0.10+9-1 [37.3 MB]
Del libcrypt1 1:4.4.17-1 [86.9 kB]
Del libtirpc-common 1.3.1-1 [13.4 kB]
Del libnsl2 1.3.0-2 [42.2 kB]
Del libkeyutils1 1.6.1-2 [15.9 kB]
Del libkrb5-3 1.18.3-4 [362 kB]
Del libkrb5support0 1.18.3-4 [65.1 kB]
Del libk5crypto3 1.18.3-4 [113 kB]
Del libssl1.1 1.1.1i-3 [1,553 kB]
Del default-jre 2:1.11-72 [1,044 B]
Del fonts-dejavu-extra 2.37-2 [2,070 kB]
Del libnss-nis 3.1-4 [25.6 kB]
Del libidn2-0 2.3.0-5 [86.7 kB]
Del ca-certificates-java 20190909 [15.7 kB]
Del libunistring2 0.9.10-4 [388 kB]
Del libkrb5support0 1.18.3-4 [68.3 kB]
Del libnss-nisplus 1.3-4 [21.6 kB]
Del libcrypt1 1:4.4.17-1 [96.6 kB]
Del java-common 0.72 [14.5 kB]
Del default-jre-headless 2:1.11-72 [10.9 kB]
Del libnsl2 1.3.0-2 [39.5 kB]
Del libk5crypto3 1.18.3-4 [117 kB]
Del libtirpc3 1.3.1-1 [90.8 kB]
Del libunistring2 0.9.10-4 [379 kB]
Del libatk-wrapper-java-jni 0.38.0-2 [56.1 kB]
(xenial)reizu@localhost:~$ sudo apt-get clean
(xenial)reizu@localhost:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
(xenial)reizu@localhost:~$ sudo apt-get install openjdk-8-jre  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package openjdk-8-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'openjdk-8-jre' has no installation candidate

答案1

要在 Ubuntu 18.04 中安装 OpenJDK Java 8 运行时,请打开终端并输入:

sudo add-apt-repository universe
sudo apt update
sudo apt install openjdk-8-jre

相关内容