Question

Unable to install Java JDK 6 on Ubuntu 13.10 x64?

Posted March 16, 2014 9.8k views
I followed the instructions as per this webpage https://www.digitalocean.com/community/articles/how-to-install-java-on-ubuntu-with-apt-get The following is the output Setting up libxfont1:amd64 (1:1.4.6-1ubuntu0.1) ... Setting up java-common (0.48ubuntu2) ... Setting up oracle-java6-installer (6u45-0~webupd8~3) ... Downloading Oracle Java 6... --2014-03-16 04:21:49-- http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin Resolving download.oracle.com (download.oracle.com)... 23.59.190.131, 23.59.190.130 Connecting to download.oracle.com (download.oracle.com)|23.59.190.131|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin [following] --2014-03-16 04:21:49-- https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.214.22.140 Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.214.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-16 04:21:49-- http://download.oracle.com/errors/download-fail-1505220.html Connecting to download.oracle.com (download.oracle.com)|23.59.190.131|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 5307 (5.2K) [text/html] Saving to: âjdk-6u45-linux-x64.binâ 0K 100% 454M=0s 2014-03-16 04:21:49 (454 MB/s) - âjdk-6u45-linux-x64.binâ saved [5307/5307] Download done. Removing outdated cached downloads... sha256sum mismatch jdk-6u45-linux-x64.bin Oracle JDK 6 is NOT installed. dpkg: error processing oracle-java6-installer (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Setting up gsfonts (1:8.11+urwcyr1.0.7~pre44-4.2ubuntu1) ... Setting up x11-common (1:7.7+1ubuntu6) ... * Setting up X socket directories... [ OK ] Processing triggers for ureadahead ... Setting up xfonts-encodings (1:1.0.4-1ubuntu1) ... Setting up xfonts-utils (1:7.7~1ubuntu1) ... Setting up gsfonts-x11 (0.22) ... Processing triggers for libc-bin ... Errors were encountered while processing: oracle-java6-installer E: Sub-process /usr/bin/dpkg returned an error code (1) Any ideas, i also the same issue even if install Jaav JDK 7?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
4 answers
Steps to install Java,

apt-get update

apt-get upgrade

sudo apt-get install openjdk-6-jdk

This solution had worked for me you can maybe try it out.
Why not use openjdk 7?

Just do apt-get install openjdk-7-jdk openjdk-7-jre
Or you can use the one Darius mentioned. Which is a newer version.
I prefer to use Oracle JDK,

I had to manually install it it

First was to download jdk-6u45-linux-x64.bin from Oracle

Then execute the following commands

chmod +x jdk-6u45-linux-*
mkdir /usr/lib/jvm/
cp jdk-6u45-linux-x64.bin /usr/lib/jvm/
cd /usr/lib/jvm/
./jdk-6u45-linux-x64.bin
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_45/bin/java" 1
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_45/bin/javac" 1
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_45/bin/javaws" 1
update-alternatives --config java
update-alternatives --config javac
update-alternatives --config javaws
Submit an Answer