在执行命令“sudo apt get install oracle-java6-installer”后,出现以下错误
注意:我有一个应用程序依赖于Java6,我觉得Java6已经过时了。但仍然有其他方法来安装这个。
错误:
Setting up oracle-java6-installer (6u45-0~webupd8~8) ...
Downloading Oracle Java 6...
--2018-03-21 13:37:46-- http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin
Resolving download.oracle.com (download.oracle.com)... 23.56.176.183
Connecting to download.oracle.com (download.oracle.com)|23.56.176.183|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin [following]
--2018-03-21 13:37:47-- https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin
Resolving edelivery.oracle.com (edelivery.oracle.com)... 184.50.117.49, 2600:1417:75:199::2d3e, 2600:1417:75:19c::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|184.50.117.49|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin?AuthParam=1521619788_32d3144ce18a102db8f7ec93e2650e1c [following]
--2018-03-21 13:37:48-- http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin?AuthParam=1521619788_32d3144ce18a102db8f7ec93e2650e1c
Connecting to download.oracle.com (download.oracle.com)|23.56.176.183|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-03-21 13:37:50 ERROR 404: Not Found.
download failed
Oracle JDK 6 is NOT installed.
dpkg: error processing package oracle-java6-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java6-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
最佳答案
似乎已经无法下载Java6了,Oracle不再向公众提供它。下载此类版本的唯一方法是与Oracle签订支持合同。看看这个post