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 (220.127.116.11-1ubuntu1) ... Processing triggers for python-central ... Errors were encountered while processing: oracle-java7-installer 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