Tuesday, October 16, 2007

howto: miserably fail installing sun java on debian

In unstable/non-free there are debian repositories for java.
This makes life very easy, in theory:

# apt-get install sun-java5-jdk sun-java5-plugin sun-java5-fonts
or
# apt-get install sun-java5-jre sun-java5-plugin sun-java5-fonts


The inconvenient practice....

First!!! make a checkpoint or image of the current state, going on with installing might mess up everything!!

in /etc/apt/sources.list there should be a link to the unstable non-free resources:


# Unstable Sid
deb http://http.us.debian.org/debian/ unstable main contrib non-free
# Unstable Sources
deb-src http://http.us.debian.org/debian/ unstable main contrib non-free


Then one needs to increase the apt cache to some ridiculous number, I did:

APT::Cache-Limit "212582912";

in /etc/apt/apt.conf.d/70debconf

Of course, an apt-get update is needed. also, in earlier tries I had problems with libcupsys2 and libcupsys2-gnutls10. Remove them both, this will strangely enough update almost all of your system, including glibc and the whole disaster that comes with doing that, sshd restart, you name it (!?! I don't even have a printer attached to that machine, it's in a datacenter !?!). Removing using dpkg might be the way to go.

So far, so good. Let's try installing java...

apt-get install sun-java5-jre


One will get to see a license agreement, this should be scrolled through completely, and then one can continue UNTIL one ends in an infinite loop:

(there will be a screenshot here as soon blogger image upload starts working again)


root# apt-get -f -m install sun-java5-jre
Reading Package Lists... Done
Building Dependency Tree... Done
sun-java5-jre is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 420 not upgraded.
2 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up sun-java5-bin (1.5.0-13-1) ...
Could not create the Java virtual machine.
dpkg: error processing sun-java5-bin (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of sun-java5-jre:
sun-java5-jre depends on sun-java5-bin (= 1.5.0-13-1) | ia32-sun-java5-bin (= 1.5.0-13-1); however:
Package sun-java5-bin is not configured yet.
Package ia32-sun-java5-bin is not installed.
dpkg: error processing sun-java5-jre (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
sun-java5-bin
sun-java5-jre
E: Sub-process /usr/bin/dpkg returned an error code (1)
root# apt-get -f -m install ia32-sun-java5-bin
Reading Package Lists... Done
Building Dependency Tree... Done
Package ia32-sun-java5-bin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
sun-java5-jre
E: Package ia32-sun-java5-bin has no installation candidate
root# apt-get -f -m install sun-java5-bin
Reading Package Lists... Done
Building Dependency Tree... Done
sun-java5-bin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 420 not upgraded.
2 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up sun-java5-bin (1.5.0-13-1) ...
Could not create the Java virtual machine.
dpkg: error processing sun-java5-bin (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of sun-java5-jre:
sun-java5-jre depends on sun-java5-bin (= 1.5.0-13-1) | ia32-sun-java5-bin (= 1.5.0-13-1); however:
Package sun-java5-bin is not configured yet.
Package ia32-sun-java5-bin is not installed.
dpkg: error processing sun-java5-jre (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
sun-java5-bin
sun-java5-jre
E: Sub-process /usr/bin/dpkg returned an error code (1)


Fix: spend a full day trying to get this working, fail, hate debian.

0 comments: