我正在尝试安装 Open JRE 8,但它显示此信息并且无法安装

我正在尝试安装 Open JRE 8,但它显示此信息并且无法安装

我尝试安装 Open JRE 8但它给出了一个错误。这就是我这样做时发生的情况。

# 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)  

答案1

从终端日志显示你已经安装了 openjdk8。你可以输入以下命令进行检查:

java -version

你应该看到这样的回应

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)

我相信您正在运行多个 Java 版本,并且您的机器正在尝试获取更新。

相关内容