strask
April 26th, 2012, 01:42 AM
Ok, so I was stupid. I added a ppa and attempted to install a package that wasn't correctly made, and now I get errors every time I do ANY package management function.
I started the problem by typing these commands:
sudo add-apt-repository ppa:eugenesan/java
sudo apt-get update
sudo apt-get install oracle-java7-installerWhat seems to happen is that the package installs, then has a post-install or configuration script that tries to download the java installer from Oracle and run it, but the script fails because the installer doesn't download correctly (or something, the checksum doesn't match).
As a side note, if I had known that the package was just going to get the installer from Oracle, I would have gone and gotten it directly. :(
Anyway, now the package is left in a "half configured" state, according to dpkg --audit, and no matter what I try to do with it (configure, remove, etc.) it just runs the same script again and fails the same way. apt-get detects and complains about this problem every time I try to do anything, like install an unrelated package via Software Center. So every operation looks like a failure, even if it succeeds.
How do I do surgery on my system to remove this broken package? I have searched and not yet found a way to remove a half-configured package or get it out of the half-configured state.
Below is the errors it gets when I try to remove it:
trask@reptoid:~$ sudo apt-get purge oracle-java7-installer
[sudo] password for trask:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
oracle-java7-installer*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 82.9 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 171317 files and directories currently installed.)
Removing oracle-java7-installer ...
update-alternatives: error: unknown argument `bootinfoscript'
dpkg: error processing oracle-java7-installer (--purge):
subprocess installed pre-removal script returned error exit status 2
Downloading...
--2012-04-25 17:47:40-- http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 98.174.31.138, 98.174.31.91
Connecting to download.oracle.com (download.oracle.com)|98.174.31.138|: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-04-25 17:47:40-- https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 184.51.30.174
Connecting to edelivery.oracle.com (edelivery.oracle.com)|184.51.30.174|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2012-04-25 17:47:41-- http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com (download.oracle.com)|98.174.31.138|: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% 8.01M=0.001s
2012-04-25 17:47:41 (8.01 MB/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 while cleaning up:
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)
trask@reptoid:~$
I started the problem by typing these commands:
sudo add-apt-repository ppa:eugenesan/java
sudo apt-get update
sudo apt-get install oracle-java7-installerWhat seems to happen is that the package installs, then has a post-install or configuration script that tries to download the java installer from Oracle and run it, but the script fails because the installer doesn't download correctly (or something, the checksum doesn't match).
As a side note, if I had known that the package was just going to get the installer from Oracle, I would have gone and gotten it directly. :(
Anyway, now the package is left in a "half configured" state, according to dpkg --audit, and no matter what I try to do with it (configure, remove, etc.) it just runs the same script again and fails the same way. apt-get detects and complains about this problem every time I try to do anything, like install an unrelated package via Software Center. So every operation looks like a failure, even if it succeeds.
How do I do surgery on my system to remove this broken package? I have searched and not yet found a way to remove a half-configured package or get it out of the half-configured state.
Below is the errors it gets when I try to remove it:
trask@reptoid:~$ sudo apt-get purge oracle-java7-installer
[sudo] password for trask:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
oracle-java7-installer*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 82.9 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 171317 files and directories currently installed.)
Removing oracle-java7-installer ...
update-alternatives: error: unknown argument `bootinfoscript'
dpkg: error processing oracle-java7-installer (--purge):
subprocess installed pre-removal script returned error exit status 2
Downloading...
--2012-04-25 17:47:40-- http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 98.174.31.138, 98.174.31.91
Connecting to download.oracle.com (download.oracle.com)|98.174.31.138|: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-04-25 17:47:40-- https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 184.51.30.174
Connecting to edelivery.oracle.com (edelivery.oracle.com)|184.51.30.174|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2012-04-25 17:47:41-- http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com (download.oracle.com)|98.174.31.138|: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% 8.01M=0.001s
2012-04-25 17:47:41 (8.01 MB/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 while cleaning up:
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)
trask@reptoid:~$