0

I'm trying to install Open JDK's JRE 8 for Minecraft. and its not working. I've tried everything.

I'm running Ubuntu 18.04 LTS

Can someone help me?

(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
2
  • Does this answer your question? How do I enable the "Universe" repository?
    – N0rbert
    Feb 18, 2021 at 5:55
  • @N0rbert You noticed the part about the missing universe repository but you didn't notice in the question's title that reizu was trying to install the default-jre package which is Java version 11, not Java 8 in Ubuntu 18.04, so Minecraft didn't have the required Java 8 dependency package.
    – karel
    Feb 18, 2021 at 7:42

1 Answer 1

0

To install OpenJDK Java 8 runtime in Ubuntu 18.04 open the terminal and type:

sudo add-apt-repository universe
sudo apt update
sudo apt install openjdk-8-jre
4
  • Thank You, it worked
    – reizu
    Feb 18, 2021 at 1:27
  • i have another comment, when i download minecraft it automatically installs jre 11 because when i do java -version it says jre 11 is installed, even after opendk 8 downloaded perfectly, what do i do?
    – reizu
    Feb 18, 2021 at 1:42
  • Manually select the default for the program "java": update-java-alternatives vs update-alternatives --config java Alternatively you can uninstall JRE 11 with sudo apt remove default-jre
    – karel
    Feb 18, 2021 at 1:59
  • 1
    Thank You so much, you got it to work for me, thanks!!!
    – reizu
    Feb 18, 2021 at 2:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .