0

whenever i run this comand : sudo apt-get install

$ sudo apt-get install

Reading package lists... Done

Building dependency tree

Reading state information... Done

0 upgraded, 0 newly installed, 0 to remove and 244 not upgraded.

2 not fully installed or removed.

After this operation, 0 B of additional disk space will be used.

Setting up oracle-java7-installer (7u40~trusty~NoobsLab.com) ...

Downloading Oracle Java 7...
--2015-04-28 12:10:32--  http  download.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.tar.gz

Resolving download.oracle.com (download.oracle.com)... 125.56.222.17, 125.56.222.11

Connecting to download.oracle.com (download.oracle.com)|125.56.222.17|:80... connected.

HTTP request sent, awaiting response... 302 Moved Temporarily

Location: https  edelivery.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.tar.gz [following]

--2015-04-28 12:10:32--  https://edelivery.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.tar.gz

Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.57.214.140

Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.57.214.140|:443... connected.

HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]

--2015-04-28 12:10:33--  http  download.oracle.com/errors/download-fail-1505220.html

Connecting to download.oracle.com (download.oracle.com)|125.56.222.17|:80... connected.

HTTP request sent, awaiting response... 200 OK


    The file is already fully retrieved; nothing to do.

Download done.

Removing outdated cached downloads...

sha256sum mismatch **jdk-7u40-linux-x64.tar.gz**

Oracle JDK 7 is NOT installed


No apport report written because the error message indicates its a followup 
error from a previous failure.

                                                                                                      dpkg: error processing package oracle-java7-installer (--configure):

 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of oracle-java7-set-default:
 oracle-java7-set-default depends on oracle-java7-installer; however:

  Package oracle-java7-installer is not configured yet.

dpkg: error processing package oracle-java7-set-default (--configure):
 dependency problems - leaving unconfigured

Errors were encountered while processing:
 oracle-java7-installer
 oracle-java7-set-default

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



i remove jdk-7u40-linux-x64.tar.gz from my /var/cache ... but still showing the same error .
Its still shows in /var/cache.
1

To fix the Oracle java 7, try this:

sudo dpkg -P oracle-java7-installer
sudo apt-get -f install
sudo apt-get install oracle-java7-installer

If you really want to install java, I suggest you install openjdk (which is an open, reference-implementation of oracle java and works better in linux) instead of oracle-java. Purge oracle java by sudo dpkg -P oracle-java7-installer and use sudo apt-get install openjdk-7-jre for installing JRE or sudo apt-get install openjdk-7-jdk for installing JDK.

  • Thanks Ron i tried this ... still same error!! i think there must be some issue with dpkg . – Sumit Jhajharia Apr 28 '15 at 13:24
  • Thanks a bunch Ron, it worked perfectly for me. @SumitJhajharia - maybe try this command first: sudo dpkg --configure -a – Tamsyn Michael Feb 24 '16 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.