Ubuntu: Oracle JDK 8 is NOT installed

package 'oracle-java8-installer' has no installation candidate
ubuntu install jdk 8
install jre ubuntu
openjdk-8 ubuntu
no package matching 'oracle-java8-installer is available
install java keytool ubuntu
oracle java ubuntu
install jdk linux command line

I've installed oracle JDK-8 on ubuntu 14.04 manually. but whenever I want to install a package that needs jdk8, apt-get tries to install jdk 8 again. my country is restricted so oracle server won't allow me to download jdk8.

$java -version

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

and the results of apt-get are:

download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

with this error, apt-get won't finish the installation.

I suspect you've installed Oracle JDK8 using the archive, extracting to your own folder. It's probably the case that Ubuntu doesn't know that you've installed Java as the system Java and so is raising the error.

To be honest, I'm not sure how you go about installing it for system wide use but this page may provide some pointers. Installing Open JDK might be the better option, but an option is also given here, and this answer might also help.

apt - How to solve 'Oracle JDK 8 is NOT installed.' error , Thanks, after searching on Internet i solved my problem: I removed 'ppa:​webupda8team/java' apt repository in software and update(press-->  This quick tutorial shows you how to easily install Oracle Java JDK 8 and/or 10 in Ubuntu 18.04 LTS via PPA. There’s no PPA package for Oracle Java 6 and 7 since they are now only available for those with an Oracle Support account (which is not free).

How to Install Oracle Java JDK 8 / 10 in Ubuntu 18.04 , There's no PPA package for Oracle Java 6 and 7 since they are now only available for those with an Oracle Support account (which is not free). The easiest way to install Oracle Java JDK 8 on Ubuntu is via a third party PPA… To add that PPA, run the commands below. sudo add-apt-repository ppa:webupd8team/java. After running the commands above, you should see a prompt to accept the PPA key onto Ubuntu… accept and continue. Continue below to install Java 8…

the first step:

sudo apt-get remove oracle-java8-installer

to clean up the failure installation of java8 perviously.

the second step:

sudo apt-get install oracle-java8-installer

to reinstall Java8

Install Oracle JDK 8 on Linux, This article shows you the way to manually install the latest Oracle Java Development Kit (Oracle JDK) in Ubuntu. In this article, We are going to perform How to Download and Install Oracle JAVA 8 on Ubuntu 18.04/16.04 LTS Manually. Java is a set of software and specifications developed at Sun Microsystems. There are two tyes of Java Platforms are JDK (Java Development Kit) and JRE (Java Runtime Environment). Both are helpful for deploying applications on

How To Install Java 8 on Ubuntu 18.04/16.04, LinuxMint 19/18, The Java developers required to install JDK and JRE both on their IMPORTANT: The Oracle Java 8 is no longer available to download  Use this tutorial to install OpenJDK Java 8 on Ubuntu 19.10, 18.04 LTS, 16.04 LTS, LinuxMint 19, 18 using PPA. Follow the below steps to install Java 8 on Ubuntu via the command line.

One of the possible reasons and solution could be, that the version of the java package is updated with the possible vulnerability patch fix, and that needs to be updated in the PPA. I faced this when installing on ubuntu 16.04.

If the specific download error is that java download link is 404, than mostly this solution will work.

Please remember to update the versions accordingly.

Oracle Java (JDK) 8 Installer PPA (DISCONTINUED) : “WebUpd8 , The Oracle JDK License has changed for releases starting April 16, 2019. at no cost -- but other uses authorized under prior Oracle JDK licenses may no longer http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html. In Ubuntu, recommended packages are automatically installed, so "oracle-java8-set-default" should be installed when installing "oracle-java8-installer". In Linux Mint on the other hand, recommended packages are not installed by default, so you must install this package manually if you want to set Oracle Java 8 as default.

How To Install Oracle Java 8 and OpenJDK 11 on Ubuntu 18.04, 19.04, Installing Oracle JDK 8 on Ubuntu 18.04/Ubuntu 19.04. Oracle JDK 8 (aka 1.8) no longer uses BCL (Binary Code License). From April 16, 2019  This installs Oracle JDK 14. On Linux distributions that automatically install recommended packages (like Ubuntu, but not Linux Mint), oracle-java14-set-default is also installed. This package sets Oracle JDK 14 as the default Java version on your system (runs update-alternatives, exports the JAVA_HOME environment variable, etc.).

How To Install Java with `apt` on Ubuntu 18.04, Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK8). There are no actual Jav a files in this PPA. Important -> Why  sudo apt-get install oracle-java8-installer Oracle JDK 9. This is a developer preview and the general release is scheduled for March 2017. It’s not recommended that you use this version because there may still be security issues and bugs. There is more information about Java 9 on the official JDK 9 website. To install JDK 9, use the following

How To Install Java with Apt-Get on Ubuntu 16.04, Not using Ubuntu 16.04? If you want to install the Oracle JDK, which is the official version distributed by Oracle, you will need to follow a few 1081 manual mode 4 /usr/lib/jvm/java-8-oracle/jre/bin/java 3 manual mode 5  "JDK Installation for Linux Platforms" "JRE Installation for Linux Platforms" "Server JRE 8 Installation for Linux Platforms" "Manual Installation and Registration of Java Plugin for Linux" To run Java applets in a browser, you must install the JRE plugin manually. This does not apply to the server JRE.

Comments
  • I found peace with oracle server. and now everything is OK. but surely the problem was with the manual installation.
  • I tried this, but on running the apt get installer again, the same error occured
  • ditto as of 01/16/2018
  • Does not work. It still tries to download and fails.
  • @mdeora which step is failing and what is the error?
  • Basically the ppa is not updated with the new version of Java8 so current version is giving 404 error on installing.
  • By right, above answer should work. Please find the references.
  • See this link, the first answer is what you need to do, My setup is ubuntu 16.04, you need to replace 8u181 with 8u191 and accordingly the hashes and urls. stackoverflow.com/questions/46815897/…
  • Among all the above answers, as well as, among many other ways I found on the internet only the steps described in this answer worked for me - Running Ubuntu 18.04 - Thank you.