I've tried to install oracle-java7-installer package from custom repository onto Ubuntu 12. It was failed during executing some post-installation script. So. I want just to rollback it and proceed with another solutions (to install java 7 jdk). I've tried to make
UPDATED with set -x
> sudo aptitude remove oracle-java7-installer The following packages will be REMOVED: oracle-java7-installer 0 packages upgraded, 0 newly installed, 1 to remove and 47 not upgraded. Need to get 0 B of archives. After unpacking 82.9 kB will be freed. (Reading database ... 61748 files and directories currently installed.) Removing oracle-java7-installer ... + uname -m + arch=amd64 + dld=x64 + J_INSTALL_DIR=/usr/lib/jvm/java-7-oracle + [ remove = remove ] + [ -d /usr/lib/jvm/java-7-oracle/man/man1 ] + basename /usr/lib/jvm/java-7-oracle/bin/* + name=* + [ ! -f /usr/bin/* -o -L /usr/bin/* ] + update-alternatives --remove bin boot dev etc home initrd.img lib lib64 lost+found media mnt opt proc raid root run sbin selinux srv sys tmp usr var vmlinuz /usr/lib/jvm/java-7-oracle/bin/* update-alternatives: error: unknown argument `dev' 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-10-24 17:53:33-- http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 18.104.22.168, 22.214.171.124 Connecting to download.oracle.com (download.oracle.com)|126.96.36.199|: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-10-24 17:53:33-- https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 188.8.131.52 Connecting to edelivery.oracle.com (edelivery.oracle.com)|184.108.40.206|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/errors/download-fail-1505220.html [following] --2012-10-24 17:53:33-- http://download.oracle.com/errors/download-fail-1505220.html Connecting to download.oracle.com (download.oracle.com)|220.127.116.11|: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% 466M=0s 2012-10-24 17:53:33 (466 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) A package failed to install. Trying to recover:
> sudo aptitude search oracle-java7-installer Cd oracle-java7-installer - Sun Java(TM) Development Kit (JDK) 7
What I can do with that? Is it possible to rollback to the previous state without trying to deinstall broken package??
So. I understand from output that scripts inside package are wrong. they failed to download tar.gz from Oracle site and failed to install due to that. Also it does not handle properly remove commande and trying to install it again when I want to remove package. The basic question - is it possible to just rollback that package without running scripts? F.e. like in windows "System restore"? Or I should do this manually?
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
sh -x /var/lib/dpkg/info/oracle-java7-installer.prerm
+ set -e
+ uname -m
+ [ = remove ]
+ [ = deconfigure ]
+ exit 0