"sha256sum mismatch jdk-7u3-linux-x64.tar.gz " error when trying to install Oracle Java

Solution 1:

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

Solution 2:

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