25

I recently installed a oracle jdk from a webupd8ppa on Ubuntu 12.04 beta, but apparently it didn't work out, and now it is giving me errors at every update or install I make, even after deactivating the ppa from my sources.

This is what I get when I try uninstalling from USC:

      installArchives() failed: (Reading database ...  
    (Reading database ... 5% 
    (Reading database ... 10% 
    (Reading database ... 15% 
    (Reading database ... 20% 
    (Reading database ... 25% 
    (Reading database ... 30% 
    (Reading database ... 35% 
    (Reading database ... 40% 
    (Reading database ... 45% 
    (Reading database ... 50% 
    (Reading database ... 55% 
    (Reading database ... 60% 
    (Reading database ... 65% 
    (Reading database ... 70% 
    (Reading database ... 75% 
    (Reading database ... 80% 
    (Reading database ... 85% 
    (Reading database ... 90% 
    (Reading database ... 95% 
    (Reading database ... 100% 
    (Reading database ... 295120 files and directories currently installed.)
Removing oracle-java7-installer ...
update-alternatives: error: unknown argument `cdrom'
dpkg: error processing oracle-java7-installer (--remove):  subprocess installed pre-removal script returned error exit status 2
No apport report written because MaxReports is reached already
Downloading...
        --2012-04-12 13:13:21--  http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz
Rsolution de download.oracle.com (download.oracle.com)...
        203.13.161.233, 203.13.161.234
Connexion vers download.oracle.com (download.oracle.com)|203.13.161.233|:80... connect. requte HTTP transmise, en attente de la rponse... 302 Moved Temporarily
Emplacement: https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz [suivant]
        --2012-04-12 13:13:21--  https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz
Rsolution de edelivery.oracle.com (edelivery.oracle.com)...
        173.223.150.174
Connexion vers edelivery.oracle.com (edelivery.oracle.com)|173.223.150.174|:443... connect. requte HTTP transmise, en attente de la rponse... 302 Moved Temporarily Emplacement: http://download.oracle.com/errors/download-fail-1505220.html [suivant]
        --2012-04-12 13:13:22--  http://download.oracle.com/errors/download-fail-1505220.html
Connexion vers download.oracle.com (download.oracle.com)|203.13.161.233|:80... connect. requte HTTP transmise, en attente de la rponse... 200 OK
Longueur: 5307 (5,2K) [text/html]
Sauvegarde en : ./jdk-7u3-linux-i586.tar.gz

             0K .....                                                 100% 4,94M=0,001s

        2012-04-12 13:13:22 (4,94 MB/s) - ./jdk-7u3-linux-i586.tar.gz sauvegard [5307/5307]

        Download done.
sha256sum mismatch jdk-7u3-linux-i586.tar.gz
Oracle JDK 7 is NOT installed.
dpkg: error while cleaning up:  subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:  oracle-java7-installer
Error in function:

I also tried "remove completely" from synaptic but it doesn't work either.

Thank you for your help in advance!

4
  • Installed jdk from webupd8 ppa?
    – Tachyons
    Apr 12, 2012 at 6:48
  • Yes, exactly, I tried to install oracle java 7 from the Webupd8 ppa.
    – stragu
    Apr 12, 2012 at 8:36
  • 1
    Try the updated answer
    – Tachyons
    Apr 13, 2012 at 0:51
  • If you want to get the webupd8 PPA version of Oracle Java 7 working, you might try the answer here. May 23, 2012 at 14:36

5 Answers 5

42

I was having the same problem on Ubuntu 11.10, tried all of the same solutions, none of which worked for me either. I found this on another discussion board and it appears to have worked for me:

If you want to remove oracle-jdk7-installer, you can simply go to /var/lib/dpkg/info/ It takes some time to load, and delete all files which starts with oracle-java7***** there was ~6files, then go to Synaptic and simply locate same oracle-jdk and click remove/completly remove.

This is where I found it: http://ubuntuforums.org/showthread.php?p=11821814

Good luck!

Edit: here are the 3 steps to easily do this:

Open a terminal (ctrl + alt + T) and type those two commands successively:

cd /var/lib/dpkg/info/
sudo rm oracle-java7-installer*

Open synaptic, search for "oracle-java7-installer", mark it for complete removal and click "apply".

Edit: For those that don't have synaptic installed, after you rm the oracle installer files, just do:

sudo apt-get purge oracle-java7-installer

And you should be good.

edit: worked on ubuntu 12.04 LTS as well

5
  • Great! This finally worked! After I did this, I removed the ppa to make sure I wouldn't have this problem any more. Now I don't get the error message after each update or after installing an app. Thank you so much for this! :)
    – stragu
    Apr 16, 2012 at 8:27
  • If you were trying to disinstall this just because it gave you this error, but you actually need oracle java, I've found that in my case it is enough to get rid of said files in /var/lib/dpkg/info/. Then sudo apt-get upgrade (or just sudo dpkg --configure -a) should fix things for you.
    – Phoenix87
    Jan 10, 2014 at 11:47
  • it also work on Debian 7 . tanks Mar 17, 2015 at 10:25
  • @jimirings, why would you rm the installer files and then purge ? Is not it the same?
    – Timo
    Mar 4, 2018 at 14:18
  • 1
    @Timo I'm not sure why rm would work while purge wouldn't. It's been four years since I ran into this problem, but as I recall, that was the case. Sep 7, 2018 at 12:27
3

Add webupd8 ppa again

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

Open the terminal and type:

  sudo apt-get update
  sudo apt-get install -f

Then purge the ppa using ppa purge

sudo apt-get install ppa-purge
sudo ppa-purge ppa:webupd8team/java

Links

  1. Why is 'ppa-purge' not installed by default?
  2. http://www.webupd8.org/2009/12/remove-ppa-repositories-via-command.html
  3. http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
  4. Are PPA's safe to add to my system and what are some "red flags" to watch out for?
4
  • I tried this, but it gives me more or less the same result: sha256sum mismatch jdk-7u3-linux-i586.tar.gz Oracle JDK 7 is NOT installed. dpkg : erreur de traitement de oracle-java7-installer (--configure) : le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1 E: Sub-process /usr/bin/dpkg returned an error code (1) Thanks anyway!
    – stragu
    Apr 13, 2012 at 2:01
  • Whats the output of sudo apt-get update?
    – Tachyons
    Apr 13, 2012 at 2:20
  • Thanks for the updated answer, but still doesn't work. I get this at the end: Oracle JDK 7 is NOT installed. dpkg: erreur de traitement de oracle-java7-installer (--configure): le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1 Aucun rapport « apport » écrit car MaxReports a déjà été atteint Des erreurs ont été rencontrées pendant l'exécution : oracle-java7-installer E: Sub-process /usr/bin/dpkg returned an error code (1) Échec de l'installation d'un paquet. Tentative de réparation: Warning: Something went wrong, packages may not have been reverted
    – stragu
    Apr 16, 2012 at 6:42
  • clean just cleans out package archives (i.e., locally stored .deb files). It doesn't do anything to installed or half-installed packages, or their configuration. May 23, 2012 at 14:35
2

Try

sudo apt-get purge <package>

Hope this works!

2
  • 1
    This returned the same error message. I also get E: Sub-process /usr/bin/dpkg returned an error code (1) at the end
    – stragu
    Apr 12, 2012 at 6:31
  • worked for me. cheers
    – Keith
    Nov 3, 2015 at 19:09
1

1st things 1st you could try the following:

sudo apt-get remove package_name

If that doesn't work because you said that the package was not completely installed then doing the sudo purge command that pjtatlow should fix the issue.

Also I am attaching an apt-get cheat sheet for future reference for you.

2
  • I tried this before, but it doesn't work. Thank you for your help though!
    – stragu
    Apr 12, 2012 at 6:31
  • What about logging into Recovery Mode and trying the un-install from there?
    – daslinkard
    Apr 12, 2012 at 21:58
1

If you encountered configuration error when installing a package in Ubuntu,you will get this error message every time when you installing an other package.It’s very annoying and there is a command to delete this mis-configured package. Run this in terminal(Applications/Accessories/Terminal):

sudo apt-get purge $(dpkg -l|grep ^rc|awk '{ print $2 }')
1
  • Thank you for your answer. It doesn't seem to have worked though, even though it got rid of around 12 packages, the problematic one wasn't listed but I got the same old error message at the end...
    – stragu
    Apr 16, 2012 at 7:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .