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 recently tried installed java 7 on ubuntu 12.04 and i think i screwed something up

I followed the instructions given here.

First you need to remove openjdk for this run the following command from your terminal

sudo apt-get purge openjdk*
Now you can install Java7 by adding the following repository:

sudo add-apt-repository ppa:eugenesan/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Now everytime i install a new program i get the following error:

Download done.
sha256sum mismatch jdk-7u3-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 python-central (0.6.17ubuntu1) ...
Setting up python-eggtrayicon (2.25.3-11) ...
Setting up gmail-notify (1.6.1.1-1ubuntu1) ...
Processing triggers for python-central ...
Errors were encountered while processing:
 oracle-java7-installer
Error in function: 

However.The program seems to install and work just fine so it doesn't seem to be a problem preventing me from doing anything

So then i reinstalled openjdk by going:

sudo apt-get install openjdk*

But i still get the same error.

going:

sudo apt-get install oracle-java7-installer gives me the same error.

What is going on?

Please let me know if this is clear or not and ill try to explain my issue better

share|improve this question
add comment

2 Answers

up vote 45 down vote accepted

Run the following commands from a Terminal:

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

Information about what PPAs are, as well as tips on recognizing which of them are unsafe, can be found here.


Glossary

Command, command line: the traditional Unix environment , where you type commands to tell the computer what to do.

Terminal: an application that allows you to access the command line. Open it by hitting its keyboard shortcut, Ctrl Alt T

share|improve this answer
    
YOU DA MAN SirCharlo!!! –  Fawkes5 Apr 27 '12 at 19:40
    
I'm happy it worked :P –  SirCharlo Apr 27 '12 at 19:42
    
Thanks a lot, it solves my problem too. –  Leandro Apr 28 '12 at 7:45
    
Unable to locate package? –  Andrew Rhyne Dec 7 '12 at 1:36
add comment

The fix is quite simple, actually. Please install Synaptic Package Manager in the Ubuntu Software Center, first. After installed, you will need to open it with root privilages:

gksu synaptic

Search for Oracle-java7-installer, right click on it, and completely remove it. Apply the changes, remove the PPA, and your error messages will be gone.enter image description here

share|improve this answer
add comment

protected by fossfreedom Apr 28 '12 at 18:07

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

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.