Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:
 oracle-java7-installer
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 at 22:18
    
it seems the webupd8 ppa is running into issues twitter.com/pdeva/status/444960868917194752 –  pdeva Mar 15 at 23:52
    
You should mark one of the answers provided below –  CrandellWS Mar 20 at 3:36

5 Answers 5

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 at 6:18
    
You should probably try to contact them and let them know ;) –  bigbadonk420 Mar 17 at 11:05
    
This works for those who want an easy update process, thought the solution suggested here askubuntu.com/a/434891/112263 can be used for those who want a way to manually update their java... –  CrandellWS Mar 20 at 3:30

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 at 3:33

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

first check your processor structure is 64bit or 32 bit and also check your ubuntu is compatible with you processor structure.

Thank you ! Keep learning Ubuntu

share|improve this answer
3  
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  guntbert Mar 15 at 22:16
    
@guntbert This certainly seems like an answer to me, in that it is telling the OP what to do, to fix the problem. However, hazzy, I do recommend editing this to expand it with specific instructions as to how to check those things (or at least links). –  Eliah Kagan Mar 15 at 23:01
1  
@EliahKagan are we reading the same text? "check your Windows ..." ? –  guntbert Mar 16 at 10:47
    
Sorry for the mistake that i did. –  hazzy Mar 16 at 13:09

I'm using ubuntu as the basis for a docker container, and ran into this problem on ubuntu 13.04. Updating to ubuntu 13.10 seemed to fix things.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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