Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed java JDK following this tutorial:

http://www.duinsoft.nl/packages.php?t=en

The installation was ok but every time I install or uninstall anything, I get this message:

Downloading...
--2012-08-08 22:12:26--  http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving download.oracle.com... 201.48.47.25, 201.48.47.27 Connecting
to download.oracle.com|201.48.47.25|:80... connected. HTTP request
sent, awaiting response... 302 Moved Temporarily Location:
https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
[following]
--2012-08-08 22:12:26--  https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving edelivery.oracle.com... 23.62.50.174 Connecting to
edelivery.oracle.com|23.62.50.174|:443... connected. HTTP request
sent, awaiting response... 302 Moved Temporarily Location:
http://download.oracle.com/errors/download-fail-1505220.html
[following]
--2012-08-08 22:12:27--  http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com|201.48.47.25|:80... connected. HTTP
request sent, awaiting response... 200 OK Length: 5307 (5.2K)
[text/html] Saving to: `./jdk-7u3-linux-x64.tar.gz'

      0K .....                                                 100%  416K=0.01s

2012-08-08 22:12:27 (416 KB/s) - `./jdk-7u3-linux-x64.tar.gz' saved
[5307/5307]

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 firefox
(14.0.1+build1-0ubuntu0.11.10.1) ... Please restart all running
instances of firefox, or you will experience problems. Setting up
firefox-globalmenu (14.0.1+build1-0ubuntu0.11.10.1) ... Errors were
encountered while processing:  oracle-java7-installer E: Sub-process
/usr/bin/dpkg returned an error code (1)

I have checked my sources.list and the is no reference to this.

How to remove this code from trying to install it every time?

share|improve this question

2 Answers 2

Java isn't installing correctly so every time you try to install something, apt attempts to fix that package. Looking at the output there it's failing to download (every time it downloads the java package, it is corrupt). You have two options.

1) Keep letting it try until it finally successfully downloads the package. 2) Uninstall oracle-java7-installer

share|improve this answer
up vote 0 down vote accepted

Problem solved, running these commands:

Just looking for any Java installer I found it in this directory and removed it

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*

Run this if you have any Java repository on your sources.list, it was not my case.

sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
share|improve this answer
1  
Just a warning for others: Don't modify or delete files in /var/lib/dpkg unless you're absolutely sure you know what you're doing. –  bseibold Aug 9 '12 at 7:03
    
Yes, I did that because I new what the problem was. –  Gerep Aug 9 '12 at 19:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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