0

Before someone comes and marks this as a duplicate I would like to mention that I have seen 10 similar problems and I have followed all of the steps but with no use. I followed

and with no exaggeration 7 more but non worked.

I simply want to install the 8th version of JDK and JRE. After following a bunch of steps here is where I’m at I added the repository and I run this command apt-get install oracle-java8-installer and I get this message:

The following packages have unmet dependencies:
oracle-java8-installer : Depends: java-common (>= 0.24) but it is not installable
Recommends: gsfonts-x11 but it is not going to be installed
Recommends: oracle-java8-set-default but it is not going to be installed

Afterwards I tried to install java-common using apt-get install java-common but I get this message:

Package java-common 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
However the following packages replace it:
java-policy

E: Package 'java-common' has no installation candidate

Its important to note that I currently have no Java packages installed (I can't use the java command) and I have added add-apt-repository ppa:webupd8team/java successfully.

This is my distribution's info:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"

I know this has been asked a lot but I have spent the last 4 hours trying to figure it out through other questions but to no avail.

David Foerster
  • 36,890
  • 56
  • 97
  • 151

2 Answers2

2

In my case I just selected all radio buttons in

Software&Updates -> Ubuntu Software -> Downloadable from the internet

and install it with

sudo apt-get install oracle-java8-installer
zx485
  • 2,865
Ivan M
  • 21
-1

I had exactly the same problem. As MichaelBay said "And did it installed updates? If not you have other problems." So it turned out I have deleted "/etc/apt/sources.list". And later on it was recreated with empty content. I found my fix here: Ubuntu fix dependency problems