无法在 ubuntu 14.04 中安装任何软件包

无法在 ubuntu 14.04 中安装任何软件包

我尝试这样做:

sudo dpkg --configure -a

Setting up oracle-java6-installer (6u45-0~webupd8~8) ...
Downloading Oracle Java 6...
--2017-10-05 01:37:47--  http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin
Resolving download.oracle.com (download.oracle.com)... 123.176.33.9, 123.176.33.24
Connecting to download.oracle.com (download.oracle.com)|123.176.33.9|: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]
--2017-10-05 01:37:47--  https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.81.23.175, 2600:140f:9:193::2d3e, 2600:140f:9:18c::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.81.23.175|: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=1507147788_6fa79be97f022ca0824a378f6e4b8796 [following]
--2017-10-05 01:37:48--  http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin?AuthParam=1507147788_6fa79be97f022ca0824a378f6e4b8796
Connecting to download.oracle.com (download.oracle.com)|123.176.33.9|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-05 01:37:49 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

我确实从 oracle java 下载了软件包,但如果尝试更新或安装任何软件,仍然会出现此错误。
如何解决?

答案1

不幸的是,Oracle 决定删除 Java 7 和 6 的二进制文件,因此导致错误弹出。

实际上,如果您有 Oracle 支持帐户(非免费),您可以获得 Oracle Java 6 和 7。

您要做的就是安装oracle-java6-installer提供的webupd8,但由于此问题,他们停止分发安装程序。

来源:http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html

防止 Oracle Java 安装程序在每次安装/更新时出现

您需要删除损坏的安装,按Ctrl+ Alt+T进入终端并输入:

sudo apt-get purge oracle-java6-installer
sudo apt-get update

相关内容