java - ubuntu安装JDK错误

标签 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):

最佳答案

Caution :- Please Read your error logs carefully..

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

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

这意味着您的互联网连接有问题。因为,已尝试连接并下载 5 次。

Assumption :- Due to some proxy/sock issue, apt-get won't be able to connect to the Internet.

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

谢谢。

关于java - ubuntu安装JDK错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48746271/

相关文章:

Java静态变量被赋予空值

linux - Qt 不会在 Linux 的 debug/release 文件夹中创建输出文件

ubuntu -/usr/bin/ld : cannot find -lGL (Ubuntu 16. 04)

linux - 如何执行logstash? (发生了错误)

java - Spring 存储库和 DATA_FORMAT 与 nativeQuery=false

java - 解析并读取java中的公钥

java - 如何将 MS Access 数据库与 Java 8 连接?

java - 如何获取对非默认 MIDI 音序器的引用?

c - 想在UBUNTU中通过C++了解无线网络的ESSID

linux - 简单替换 init 以启动控制台