Raounak Sharma
Raounak Sharma

Reputation: 375

Installing Java8 on Ubuntu

I am using the command to install java8 on my system but it is not working the command is:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

the last line is giving me the error:

HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz [following]
--2017-10-18 22:38:13--  https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.108.215.179, 2600:1417:56:186::2d3e, 2600:1417:56:187::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.108.215.179|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508346614_8bc760b7bd61b60912b47718e848ca92 [following]
--2017-10-18 22:38:14--  http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508346614_8bc760b7bd61b60912b47718e848ca92
Connecting to download.oracle.com (download.oracle.com)|23.32.28.209|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-18 22:38:17 ERROR 404: Not Found.

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)

I went to the link and it is 404 response. Want to know why this is happening and is there a problem with my public key or what.

Please help. Thanks in advance

Upvotes: 2

Views: 1411

Answers (1)

Luís Fernando
Luís Fernando

Reputation: 133

Are you sure that OpenJDK 8 won't work for you? Cause you can install just by using:

$ sudo apt-get update 
$ sudo apt-get install default-jdk

If not, you can always manually install the Oracle JDK 8 from Oracle's website. First download and then follow these instructions.

Edit 1: Seems a problem on their side, check: https://ubuntuforums.org/showthread.php?t=2374686
For now I recommend to install manually.

Upvotes: 3

Related Questions