J'ai un Ubuntu 13.04 64 bits installé et je voudrais installer JDK 7 pour Oracle Sql Developer. Mon problème est que lorsque j'essaie de l'installer, j'obtiens le suivant:
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'ai déjà cherché sur Internet et j'ai trouvé une solution qui fonctionnait pour les gens:
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
et
Sudo dpkg -P Oracle-Java7-installer
Sudo apt-get -f install
Sudo apt-get install Oracle-Java7-installer
mais aucun d'eux ne fonctionnait pour moi. Recevez toujours le même message. Quelqu'un pourrait-il m'aider avec ça?
Veuillez suivre les étapes ci-dessous pour installer Oracle Java:
Téléchargez la dernière version Java SE SDK version.
http://www.Oracle.com/technetwork/Java/javase/downloads/index.html
Décompressez l'archive:
tar -xzvf /root/jdk-7u17-linux-x64.tar.gz
mv jdk1.7.0_17 /opt
cd /opt/jdk1.7.0_17
Cette étape enregistre la version téléchargée de Java comme alternative, et la commute pour être utilisée par défaut:
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
Tester
Pour vérifier la version de Java vous exécutez maintenant
Java -version
Pour vérifier le plugin du navigateur, accédez à http://www.Java.com/ et cliquez sur "Ai-je Java?"