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

When I tried to install Oracle Java with command

$sudo apt-get install oracle-java7-installer

I got 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:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I start my search for this error

E: Sub-process /usr/bin/dpkg returned an error code (1)

I delete lock file from /var/lib/dpkg/ and also clear the partial packages from /var/cache/apt/archives and tried force installation too with $sudo apt-get -f install  . But still got same error.

When I look more precisely into it, I found this line:

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

I googled about it and find that my oracle installation is conflicting with  halfly configured oracle( I tried before, but due to electricity cut off, I could not complete this installation).

I found these commands that help me.

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

Reference:  http://askubuntu.com/a/126419


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s