Erro ao instalar o Oracle JDK 9 Ubuntu 17.10 [duplicado]

4

Eu fiz uma nova instalação do Ubuntu 17.10. Agora estou tentando instalar o Java 9 no Ubuntu. Eu segui isso askubuntu answer e quando eu executo sudo apt-get install oracle-java9-installer isto é o que estou recebendo

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  gsfonts-x11 oracle-java9-set-default
Suggested packages:
  binfmt-support visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core
  ttf-kochi-gothic | ttf-sazanami-gothic ttf-kochi-mincho
  | ttf-sazanami-mincho ttf-arphic-uming
The following NEW packages will be installed:
  gsfonts-x11 oracle-java9-installer oracle-java9-set-default
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 35.2 kB/42.5 kB of archives.
After this operation, 231 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://ppa.launchpad.net/webupd8team/java/ubuntu artful/main amd64 oracle-java9-installer amd64 9.0.1-1~webupd8~0 [30.8 kB]
Get:2 http://ppa.launchpad.net/webupd8team/java/ubuntu artful/main amd64 oracle-java9-set-default amd64 9.0.1-1~webupd8~0 [4,442 B]
Fetched 35.2 kB in 2s (13.2 kB/s)                   
Preconfiguring packages ...
Selecting previously unselected package oracle-java9-installer.
(Reading database ... 256251 files and directories currently installed.)
Preparing to unpack .../oracle-java9-installer_9.0.1-1~webupd8~0_amd64.deb ...
oracle-license-v1-1 license has already been accepted
Unpacking oracle-java9-installer (9.0.1-1~webupd8~0) ...
Setting up oracle-java9-installer (9.0.1-1~webupd8~0) ...
No /var/cache/oracle-jdk9-installer/wgetrc file found.
Creating /var/cache/oracle-jdk9-installer/wgetrc and
using default oracle-java9-installer wgetrc settings for it.
Downloading Oracle Java 9...
--2018-01-17 06:08:30--  http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.66.247.173
Connecting to download.oracle.com (download.oracle.com)|23.66.247.173|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz [following]
--2018-01-17 06:08:30--  https://edelivery.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 118.214.58.117, 2402:d000:130:281::2d3e, 2402:d000:130:289::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|118.214.58.117|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz?AuthParam=1516149631_fbfbf47dc4fd2a5e471045e2cd2db76f [following]
--2018-01-17 06:08:33--  http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz?AuthParam=1516149631_fbfbf47dc4fd2a5e471045e2cd2db76f
Connecting to download.oracle.com (download.oracle.com)|23.66.247.173|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-01-17 06:08:34 ERROR 404: Not Found.

download failed
Oracle JDK 9 is NOT installed.
dpkg: error processing package oracle-java9-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)

Por que o download falha e o Oracle JDK 9 não está sendo instalado. Como posso consertar isso?

    
por Pankaja Paranavitharana 17.01.2018 / 01:45

1 resposta

3

Eu tentei fazer o download do Oracle Java 9 manualmente a partir do site oficial da Oracle em: link e o link para download do jdk-9.0.4_linux-x64_bin.tar.gz está funcionando. Sua outra alternativa é instalar o openjdk-9-jdk dos repositórios padrão do Ubuntu 17.10.

Instale o Oracle Java JDK da forma manual

Se você tiver problemas para fazer com que o Java 9 funcione corretamente com a biblioteca React JavaScript, não desista porque você pode ter várias versões do Java instaladas uma ao lado da outra e configurar a versão Java do terminal seguindo as instruções em Como definir a versão padrão do Java? .

    
por karel 17.01.2018 / 13:54