Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm getting this output when i try to install oracle-java7 from webupd8 ppa

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
Setting up gsfonts-x11 (0.22) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
Could you describe the exact commands that you tried, also, the command you used to get that error. – Braiam Mar 15 '14 at 22:18
it seems the webupd8 ppa is running into issues – pdeva Mar 15 '14 at 23:52
You should mark one of the answers provided below – CrandellWS Mar 20 '14 at 3:36
There may also be some proxy related issue. Check if you can connect to internet directly or should you define some proxy config. – devrimbaris May 5 '15 at 14:32

I face same problem and get in a solution:

  1. Download the JDK here.
  2. Then go to /var/cache/oracle-jdk7-installer/
  3. In that dir remove jdk-7u51-linux-x64.tar.gz and paste the version downloaded from Oracle website.
  4. Try sudo apt-get install oracle-java7-installer again.. this time should work fine!
share|improve this answer
Upvoted. I think this is the most correct and simple way to solve the problem. I hope the webupd8 guys will issue an updated package solving this issue soon. – dschulz Mar 17 '14 at 6:18
You should probably try to contact them and let them know ;) – pzkpfw Mar 17 '14 at 11:05
This works for those who want an easy update process, thought the solution suggested here can be used for those who want a way to manually update their java... – CrandellWS Mar 20 '14 at 3:30
FOR JDK8 - do apt-get install oracle-java8-installer, it would work automatically without the need to mess with /var – Yehonatan Tsirolnik Dec 1 '14 at 15:11

This is the key:

sha256sum mismatch jdk-7u51-linux-x64.tar.gz

The file jdk-7u51-linux-x64.tar.gz has been corrupted and fails to validate against the expected hash. Try downloading it again, that might fix your issue.

share|improve this answer
this may be due to not updating prior to installing. I know I was able to easily use the webupd8team/java ppa on a freshly installed system with auto updates but ran in this problem on the system that requires manual updates... – CrandellWS Mar 20 '14 at 3:33
up vote 1 down vote accepted

I download source file from Oracle's website and installed manually from scratch... It is working well now ... The solution I used is here

The instructions given are as follows and should be updated for the current version:

Download Java SE 7 JDK for Linux x86 archive. At the time of writing, the file I'm using is jdk-7u21-linux-i586.tar.gz, but the filename will change as updates are released. Apparently there is no longer a jvm folder, so create one.

sudo mkdir /usr/lib/jvm

Move the archive to the jvm folder

sudo mv jdk-7u21-linux-i586.tar.gz /usr/lib/jvm/

Change to the jvm folder and extract the JDK from the archive

cd /usr/lib/jvm

sudo tar zxvf jdk-7u21-linux-i586.tar.gz

Everything will be extracted to a new jdk1.7.0_21 folder and you can delete the archive file now. Make symbolic links to the new java binary.

sudo ln -s -b /usr/lib/jvm/jdk1.7.0_21/jre/bin/java /etc/alternatives/java

sudo ln -s -b /usr/lib/jvm/jdk1.7.0_21/jre/bin/java /usr/bin/java

Double-check the version

java -version

share|improve this answer

protected by Community May 5 '15 at 16:19

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.