Why is oracle-java8-installer not installing on Ubuntu 18.04?

I'm trying to install the oracle-java8-installer on Ubuntu 18.04, with the following commands:

apt-get update
apt-get install --yes --no-install-recommends software-properties-common && add-apt-repository ppa:webupd8team/java -y && echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
apt-get install oracle-java8-installer

Suddenly this started failing:

Downloading Oracle Java 8...
--2019-01-15 21:37:57--
Resolving download.oracle.com (download.oracle.com)... 23.198.4.45
Connecting to download.oracle.com (download.oracle.com)|23.198.4.45|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: [following]
--2019-01-15 21:37:57--
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.34.18.118, 2001:4de0:2204:98::366, 2001:4de0:2204:93::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.34.18.118|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: [following]
--2019-01-15 21:37:58--
Connecting to download.oracle.com (download.oracle.com)|23.198.4.45|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: [following]
--2019-01-15 21:37:58--
Connecting to download.oracle.com (download.oracle.com)|23.198.4.45|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-15 21:38:00 ERROR 404: Not Found.

Has this file recently been deleted or moved?

4

1 Answer

We can download the java manually and install it very easily.

Download the java 8 version: jdk-8u212-linux-x64.tar.gz

Steps to Install:

 sudo mkdir /usr/local/java sudo tar xvzf jdk-8u212-linux-x64.tar.gz sudo mv jdk1.8.0_212 /usr/local/java/ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_212/bin/javac" 1 sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_212/bin/java" 1 sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.8.0_212/bin/javaws" 1 sudo chmod a+x /usr/bin/java sudo chmod a+x /usr/bin/javac sudo chmod a+x /usr/bin/javaws sudo chown -R root:root /usr/local/java/jdk1.8.0_212 sudo update-alternatives --config java

Check the version once installation got successful.

sudo java -version
0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like