Thursday, May 2, 2024
19
rated 0 times [  19] [ 0]  / answers: 1 / hits: 65131  / 3 Years ago, mon, may 3, 2021, 5:15:53

I'm trying to install JDK7 on ubuntu 12.4.



In the first try, the power has gone and the laptop shutdown in the middle of downloading JDK7 using terminal as I was using the next terminal commands



sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer


when the power returned and I tried to install JDK7 again there was a problem with the lock but I fixed it using the following commands after restarting the machine



sudo apt-get install whatever


after that I tried installing again using the three commands above, the first was done with no errors and the second too,



but the third command downloaded the package successfully but an error appeared



Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-7u51-linux-i586.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
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)


I searched for solutions for this error and found some, tried the following instructions



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


tried again but the same "Oracle JDK7 is NOT installed" error appeared.



tried sudo apt-get -f install



salahuddin@salahuddin:~$ sudo apt-get -f install
[sudo] password for salahuddin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
thunderbird-globalmenu
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 259 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up oracle-java7-installer (7u51-0~webupd8~1) ...
Downloading Oracle Java 7...
--2014-02-03 16:28:51-- http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-i586.tar.gz
Resolving download.oracle.com (download.oracle.com)... 41.128.128.35, 41.128.128.40
Connecting to download.oracle.com (download.oracle.com)|41.128.128.35|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-i586.tar.gz [following]
--2014-02-03 16:28:51-- https://edelivery.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-i586.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.48.230.140
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.48.230.140|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-i586.tar.gz?AuthParam=1391437853_a122991b0aaf032ed8c2812472d1c92c [following]
--2014-02-03 16:28:53-- http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-i586.tar.gz?AuthParam=1391437853_a122991b0aaf032ed8c2812472d1c92c
Connecting to download.oracle.com (download.oracle.com)|41.128.128.35|:80... connected.
HTTP request sent, awaiting response... 416 Requested Range Not Satisfiable

The file is already fully retrieved; nothing to do.

Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-7u51-linux-i586.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
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)


Don't know how to fix it



please help



thanks in advance


More From » installation

 Answers
2

Run the below commands on terminal,



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

[#27151] Wednesday, May 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
unsmmoth

Total Points: 72
Total Questions: 113
Total Answers: 95

Location: Thailand
Member since Tue, Oct 6, 2020
4 Years ago
;