-1

I get the error below while trying to intall Oracle Java 8. Please tell me what's wrong.

$ sudo apt-get install oracle-java8-installer
[sudo] password for pragya: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package oracle-java8-installer 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 'oracle-java8-installer' has no installation candidate
pomsky
  • 68,507

1 Answers1

0

Add this repository

sudo add-apt-repository ppa:webupd8team/java

Then do

sudo apt-get update

And then jdk8

sudo apt-get install oracle-java8-installer

Hope this works.