Ubuntu 13.04 - Não é possível instalar o JDK7 [closed]

1

Eu tenho um Ubuntu 13.04 de 64 bits instalado e gostaria de instalar o JDK 7 para o Oracle Sql Developer. Meu problema é quando tento instalá-lo recebo o seguinte:

kwarr@kwarr-K54LY:~$ sudo apt-get install oracle-java7-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  visualvm ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho
  ttf-sazanami-mincho ttf-arphic-uming
The following NEW packages will be installed:
  oracle-java7-installer
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/17,6 kB of archives.
After this operation, 110 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package oracle-java7-installer.
(Reading database ... 200447 files and directories currently installed.)
Unpacking oracle-java7-installer (from .../oracle-java7-installer_7u51-0~webupd8~1_all.deb) ...
oracle-license-v1-1 license has already been accepted
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for shared-mime-info ...
Setting up oracle-java7-installer (7u51-0~webupd8~1) ...
Downloading Oracle Java 7...
--2014-03-22 15:18:09--  http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 77.109.171.147, 77.109.171.160
Connecting to download.oracle.com (download.oracle.com)|77.109.171.147|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz [following]
--2014-03-22 15:18:10--  https://edelivery.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.54.22.140
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.54.22.140|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2014-03-22 15:18:10--  http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com (download.oracle.com)|77.109.171.147|:80... connected.
HTTP request sent, awaiting response... 200 OK

    The file is already fully retrieved; nothing to do.

Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-7u51-linux-x64.tar.gz
Oracle JDK 7 is NOT installed.
dpkg: error processing oracle-java7-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

Já pesquisei na internet e encontrei alguma solução que funcionasse para as pessoas:

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

e

sudo dpkg -P oracle-java7-installer
sudo apt-get -f install
sudo apt-get install oracle-java7-installer

mas nenhum deles funcionou para mim. Ainda receba a mesma mensagem. Alguém poderia me ajudar com isso?

    
por kwarr 22.03.2014 / 16:20

1 resposta

2

Por favor, siga os passos abaixo para instalar o Oracle java:

  • Faça o download da versão mais recente do Java SE SDK.

    link

  • Descompacte o arquivo:

    tar -xzvf /root/jdk-7u17-linux-x64.tar.gz
    mv jdk1.7.0_17 /opt
    cd /opt/jdk1.7.0_17
    
  • Esta etapa registra a versão baixada do Java como uma alternativa e a alterna para ser usada como padrão:

    update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_17/bin/java 1
    update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_17/bin/javac 1
    update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so 1
    update-alternatives --set java /opt/jdk1.7.0_17/bin/java
    update-alternatives --set javac /opt/jdk1.7.0_17/bin/javac
    update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so
    
  • Teste

    Para verificar a versão do Java que você está executando agora

    java -version
    

    Para verificar o plug-in do navegador, acesse link e clique em "Tenho Java?"

por Vivek 22.03.2014 / 17:50