ubuntu中的JDK安装错误

时间:2018-02-12 12:14:18

标签: java ubuntu

sudo apt-get install oracle-java9-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
oracle-java9-installer is already the newest version (9.0.4-1~webupd8~0).
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.
6 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-java9-installer (9.0.4-1~webupd8~0) ...
Using wget settings from /var/cache/oracle-jdk9-installer/wgetrc
Downloading Oracle Java 9...
--2018-02-12 17:41:38--  http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.57.201.44
Connecting to download.oracle.com (download.oracle.com)|23.57.201.44|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.

--2018-02-12 17:41:39--  (try: 2)  http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz
Connecting to download.oracle.com (download.oracle.com)|23.57.201.44|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.

--2018-02-12 17:41:41--  (try: 3)  http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz
Connecting to download.oracle.com (download.oracle.com)|23.57.201.44|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.

--2018-02-12 17:41:44--  (try: 4)  http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz
Connecting to download.oracle.com (download.oracle.com)|23.57.201.44|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.

--2018-02-12 17:41:48--  (try: 5)  http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz
Connecting to download.oracle.com (download.oracle.com)|23.57.201.44|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Giving up.

download failed
Oracle JDK 9 is NOT installed.
dpkg: error processing package oracle-java9-installer (--configure):

1 个答案:

答案 0 :(得分:1)

  

注意: - 请仔细阅读您的错误日志..

如果您能看到显示的错误消息。

-2018-02-12 17:41:48--  (try: 5)
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Giving up.

这表示您的互联网连接存在问题。因为,有5次尝试连接和下载它。

  

假设: - 由于某些代理/袜子问题,apt-get将无法连接到互联网。

通常当防火墙断开连接或主机是另一台主机的代理,而另一台主机丢弃

感谢。