3

As you can see in the screenshot, i was told to apt-get install oracle-java8-install but it gave me an error that I don't have met dependencies of java-common. Okay, great. Now I try to install apt-get install java-common. Another error! Now I'm totally lost.

Ubuntu is at version 18.04, after so many years why is it still such a PITA to install simple stuff like this.

I am going to cry.

enter image description here

2 Answers2

2

Why is it such a PITA? The Oracle version of Java is not able to be distributed the same way as other Ubuntu packages. The best solution to this is to use the openJDK version of Java.

If you absolutely need to use Oracle Java 8, you'll need to add a PPA to your repository list:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt update

And then install Oracle Java 8 (I'm assuming you also want it to be set as default)

$ sudo apt install oracle-java8-set-default

This should begin the installation, and you should get a prompt asking to accept the license. Use the keyboard to accept it, and it should begin downloading Oracle Java 8. You should see a progress indicator that scrolls up your screen.

It should install Oracle Java 8 update 181.

0

My sources were all messed up it seems. Everything was commented out in this file: /etc/apt/sources.list

I pasted the following into it instead:

#------------------------------------------------------------------------------#
#                            OFFICIAL UBUNTU REPOS                             #
#------------------------------------------------------------------------------#


###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse