0

I tried to install Open JRE 8 following this but it gives an error. This is what happens when I do it.

# apt-get install openjdk-8-jre  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
openjdk-8-jre is already the newest version (8u151-b12-0ubuntu0.16.04.2).  
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  
1 not fully installed or removed.  
After this operation, 0 B of additional disk space will be used.  
Do you want to continue? [Y/n] y  
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...  
Downloading Oracle Java 7...  
--2018-02-10 02:37:00--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz  
Resolving download.oracle.com (download.oracle.com)... 23.45.100.92  
Connecting to download.oracle.com (download.oracle.com)|23.45.100.92|:80... connected.  
HTTP request sent, awaiting response... 302 Moved Temporarily  
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]  
--2018-02-10 02:37:00--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz  
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.109.81.24, 2a02:26f0:10:290::2d3e, 2a02:26f0:10:294::2d3e  
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.109.81.24|:443... connected.  
HTTP request sent, awaiting response... 302 Moved Temporarily  
Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1518226740_e8a44114a192afe1bcec53b144358538 [following]  
--2018-02-10 02:37:00--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1518226740_e8a44114a192afe1bcec53b144358538  
Connecting to download.oracle.com (download.oracle.com)|23.45.100.92|:80... connected.  
HTTP request sent, awaiting response... 404 Not Found  
2018-02-10 02:37:02 ERROR 404: Not Found.  
download failed  
Oracle JDK 7 is NOT installed.  
dpkg: error processing package oracle-java7-installer (--configure):  
 subprocess installed post-installation script returned error exit status 1  
Errors were encountered while processing:  
 oracle-java7-installer  
E: Sub-process /usr/bin/dpkg returned an error code (1)  
galoget
  • 2,943
  • 2
  • 20
  • 24
  • 3
    Possible duplicate of [Installing Java 7 in 16.04 and using multiple Java versions](https://askubuntu.com/questions/990951/installing-java-7-in-16-04-and-using-multiple-java-versions) and [Cannot install JDK 9 via apt](https://askubuntu.com/questions/996774/cannot-install-jdk-9-via-apt) – karel Feb 10 '18 at 03:22
  • The JRE of OpenJDP 8 is already installed successfully (“`openjdk-8-jre` is already the newest version (`8u151-b12-0ubuntu0.16.04.2`).”) but there’s a broken Oracle Java 7 installation. Do you want to keep it or remove it? The answer (or duplicate link) is going to depend on that. – David Foerster Feb 10 '18 at 07:54
  • @DavidFoerster -- I think Java7 has been obsoleted, so removal is his only option – ravery Feb 10 '18 at 14:06
  • @ravery: Some people have sensible reasons to keep (Oracle) Java 7 and it's still possible to install it from old packages and/or tar balls. – David Foerster Feb 10 '18 at 16:12
  • @DavidFoerster - true. I meant that the oracle archive that the installer is trying to access may not exist anymore. – ravery Feb 10 '18 at 17:04

1 Answers1

0

From the terminal log it shows you already have openjdk8 installed. you can check by typing

java -version

you should see a response like this

java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)

I believe you have multiple java versions running, and your machine is trying to fetch an update.

chized
  • 55
  • 5