Erro ao instalar o java 8 no ubuntu 15.10 [fechado]

1

Eu usei esses comandos para instalar o java 8 em meus servidores Ubuntu:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo update-java-alternatives -s java-8-oracle

Mas em um servidor eu tenho um problema quando digito apt-get install oracle-java8-installer .... e depois de aceitar os termos ...

Aqui está o problema:

Downloading Oracle Java 8...
--2017-06-02 21:25:56--  download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 2.16.4.176, 2.16.4.178
Connecting to download.oracle.com (download.oracle.com)|2.16.4.176|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: edelivery.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz [following]
--2017-06-02 21:25:56--  edelivery.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 2.21.253.143, 2a02:26f0:2d:481::2d3e, 2a02:26f0:2d:483::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|2.21.253.143|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: (download(.)oracle(.)com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz?AuthParam=1496431676_6bda1c9f8e9f814775eb5960113152cc [following]
--2017-06-02 21:25:56--  download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz?AuthParam=1496431676_6bda1c9f8e9f814775eb5960113152cc
Connecting to download.oracle.com (download(.)oracle(.)com)|2.16.4.176|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-06-02 21:25:58 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
dpkg: dependency problems prevent configuration of oracle-java8-set-default:
 oracle-java8-set-default depends on oracle-java8-installer; however:
  Package oracle-java8-installer is not configured yet.

dpkg: error processing package oracle-java8-set-default (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 oracle-java8-installer
 oracle-java8-set-default
E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por alex cojocaru 02.06.2017 / 21:33

1 resposta

1

Os seguintes comandos são ilustrados em detalhes aqui Instale o Oracle Java 8/9 em Ubuntu 16.04, Linux Mint 18

Simplesmente, os passos são:

  1. Adicione o PPA. Abra o terminal (Ctrl + Alt + T) e execute o comando:

    sudo add-apt-repository ppa:webupd8team/java
    
  2. Atualize e instale o script de instalação

    sudo apt update; sudo apt install oracle-java8-installer
    
  3. Verifique a versão do Java: Para verificar a versão do Java depois de instalar o pacote, execute o comando:

    javac -version
    
  4. Definir variáveis de ambiente Java

    sudo apt install oracle-java8-set-default
    
por Haitham A. El-Ghareeb 02.06.2017 / 21:35