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 ( ...
Processing triggers for python-central ...
Errors were encountered while processing:
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.


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

2 Answers 2


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.


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

  • YOU DA MAN SirCharlo!!!
    – Fawkes5
    Apr 27, 2012 at 19:40
  • I'm happy it worked :P
    – SirCharlo
    Apr 27, 2012 at 19:42
  • 1
    Unable to locate package? Dec 7, 2012 at 1:36
  • 1
    This no longer works.
    – Newskooler
    Jul 18, 2019 at 18:43

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 privileges:

gksu synaptic  

Or else in Ubuntu 12.04 or later, you can search for synaptic in the Dash and click on the Synaptic icon to open Synaptic. You will be asked to authenticate with your user password in order to open 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

  • 1
    No need to install synaptic just for this. You can use apt-get remove --purge oracle-java7-installer, the --purge is the equivalent of synaptic's "completely remove" option
    – STW
    May 28, 2015 at 18:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .