Java

JDK 上的錯誤 404 下載 Debian 8

  • January 16, 2019

我正在嘗試使用以下命令在我的 debian 上下載並安裝 JDK 8:apt-get install oracle-java8-installer

這是我得到的日誌:

[...]
Do you want to continue? [Y/n] Y
Setting up oracle-java8-installer (8u191-1~webupd8~1) ...
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2019-01-15 23:15:16--  http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-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/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz [following]
--2019-01-15 23:15:16--  https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.43.114.123, 2a02:26f0:64:18e::366, 2a02:26f0:64:1b6::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.43.114.123|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=15475906                                                     37_9166d63baaaf8c1cb5bbe211d579a825 [following]
--2019-01-15 23:15:16--  http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?Aut                                                     hParam=1547590637_9166d63baaaf8c1cb5bbe211d579a825
Connecting to download.oracle.com (download.oracle.com)|23.45.100.92|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547590                                                     637_9166d63baaaf8c1cb5bbe211d579a825 [following]
--2019-01-15 23:15:16--  https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?Au                                                     thParam=1547590637_9166d63baaaf8c1cb5bbe211d579a825
Connecting to download.oracle.com (download.oracle.com)|23.45.100.92|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-15 23:15:16 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)

我的防火牆中是否有什麼配置錯誤或者我遺漏了什麼?

該軟體包本質上是一個用於從 Oracle.com 下載 Java 安裝程序的打包腳本。

它曾經在 Debian 8 和 Java 8 的鼎盛時期工作——它不再工作了,因為特定的 Java 8 安裝文件不再在那個位置。

世界只是繼續前進 - 同樣來自錯誤,未找到 404 表示存在通信,並且與阻塞的埠/防火牆沒有任何關係。對方正在回答,它只是在說“404 - Not Found”。

我建議使用另一種方​​法來安裝 Java 框架。對於openjdk大多數項目來說,替代方案已經綽綽有餘,並且很容易安裝為:

sudo apt-get install openjdk-8-jdk

引用自:https://unix.stackexchange.com/questions/494694