DAB install of sun-java6-jre fails

apmuthu

Well-Known Member
Feb 26, 2009
807
8
58
Chennai - India & Singapore
github.com
dab install sun-java6-jre fails:
Code:
dab install sun-java6-jre
download: [URL]http://ftp.debian.org/debian/pool/main/u/unixodbc/unixodbc_2.2.11-16_i386.deb[/URL]
download: [URL]http://ftp.debian.org/debian/pool/main/u/unixodbc/odbcinst1debian1_2.2.11-16_i386.deb[/URL]
download: [URL]http://ftp.debian.org/debian/pool/non-free/s/sun-java6/sun-java6-jre_6-20-0lenny1_all.deb[/URL]
download: [URL]http://ftp.debian.org/debian/pool/non-free/s/sun-java6/sun-java6-bin_6-20-0lenny1_i386.deb[/URL]
download: [URL]http://ftp.debian.org/debian/pool/main/j/java-common/java-common_0.30_all.deb[/URL]
install: unixodbc
install: odbcinst1debian1
install: sun-java6-jre
install: sun-java6-bin
install: java-common
command 'vzctl exec2 90000 defenv dpkg --force-depends --force-confold --install /unixodbc_2.2.11-16_i386.deb /odbcinst1debian1_2.2.11-16_i386.deb /sun-java6-jre_6-20-0lenny1_all.deb /sun-java6-bin_6-20-0lenny1_i386.deb /java-common_0.30_all.deb' failed with exit code 1
command 'vzctl exec2 90000 defenv dpkg --force-depends --force-confold --install /unixodbc_2.2.11-16_i386.deb /odbcinst1debian1_2.2.11-16_i386.deb /sun-java6-jre_6-20-0lenny1_all.deb /sun-java6-bin_6-20-0lenny1_i386.deb /java-common_0.30_all.deb' failed with exit code 1
make: *** [all] Error 1

The content of the /etc/apt/sources.list is:
Code:
deb [URL]http://ftp.debian.org/debian[/URL] lenny main contrib non-free
deb [URL]http://security.debian.org[/URL] lenny/updates main contrib non-free
deb [URL]http://www.backports.org/debian[/URL] lenny-backports main contrib non-free
 
After creating a Debian Virtual Machine (OpenVZ) and from within it (SSH), tried to install Java6 JRE (lenny non-free) and got the following error:

Code:
After this operation, 114MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 [URL]http://security.debian.org[/URL] lenny/updates/main libavahi-common-data 0.6.23-3lenny2 [31.3kB]
Get:2 [URL]http://ftp.debian.org[/URL] lenny/main java-common 0.30 [77.0kB]
Get:3 [URL]http://security.debian.org[/URL] lenny/updates/main libavahi-common3 0.6.23-3lenny2 [48.0kB]
Get:4 [URL]http://security.debian.org[/URL] lenny/updates/main libavahi-core5 0.6.23-3lenny2 [115kB]
Get:5 [URL]http://security.debian.org[/URL] lenny/updates/main avahi-daemon 0.6.23-3lenny2 [87.9kB]
Get:6 [URL]http://ftp.debian.org[/URL] lenny/non-free sun-java6-jre 6-20-0lenny1 [6532kB]
Get:7 [URL]http://ftp.debian.org[/URL] lenny/main odbcinst1debian1 2.2.11-16 [65.8kB]
Get:8 [URL]http://ftp.debian.org[/URL] lenny/main unixodbc 2.2.11-16 [286kB]
Get:9 [URL]http://ftp.debian.org[/URL] lenny/non-free sun-java6-bin 6-20-0lenny1 [29.5MB]
Get:10 [URL]http://ftp.debian.org[/URL] lenny/main libdaemon0 0.12-2lenny1 [12.5kB]
Get:11 [URL]http://ftp.debian.org[/URL] lenny/main libdbus-1-3 1.2.1-5+lenny1 [148kB]
Get:12 [URL]http://ftp.debian.org[/URL] lenny/main dbus 1.2.1-5+lenny1 [230kB]
Get:13 [URL]http://ftp.debian.org[/URL] lenny/main dbus-x11 1.2.1-5+lenny1 [64.1kB]
Get:14 [URL]http://ftp.debian.org[/URL] lenny/main gsfonts 1:8.11+urwcyr1.0.7~pre44-3 [3373kB]
Get:15 [URL]http://ftp.debian.org[/URL] lenny/main libxfont1 1:1.3.3-1 [146kB]
Get:16 [URL]http://ftp.debian.org[/URL] lenny/main xfonts-encodings 1:1.0.2-3 [584kB]
Get:17 [URL]http://ftp.debian.org[/URL] lenny/main xfonts-utils 1:7.4+1 [82.0kB]
Get:18 [URL]http://ftp.debian.org[/URL] lenny/main gsfonts-x11 0.21 [10.4kB]
Get:19 [URL]http://ftp.debian.org[/URL] lenny/main libasound2 1.0.16-2 [356kB]
Get:20 [URL]http://ftp.debian.org[/URL] lenny/main libnss-mdns 0.10-3 [24.0kB]
Fetched 41.7MB in 21min5s (33.0kB/s)
Preconfiguring packages ...
Selecting previously deselected package java-common.
(Reading database ... 20069 files and directories currently installed.)
Unpacking java-common (from .../java-common_0.30_all.deb) ...
Selecting previously deselected package sun-java6-jre.
Unpacking sun-java6-jre (from .../sun-java6-jre_6-20-0lenny1_all.deb) ...
Selecting previously deselected package odbcinst1debian1.
Unpacking odbcinst1debian1 (from .../odbcinst1debian1_2.2.11-16_i386.deb) ...
Selecting previously deselected package unixodbc.
Unpacking unixodbc (from .../unixodbc_2.2.11-16_i386.deb) ...
Selecting previously deselected package sun-java6-bin.
Unpacking sun-java6-bin (from .../sun-java6-bin_6-20-0lenny1_i386.deb) ...
sun-dlj-v1-1 license has already been accepted
Selecting previously deselected package libavahi-common-data.
Unpacking libavahi-common-data (from .../libavahi-common-data_0.6.23-3lenny2_i386.deb) ...
Selecting previously deselected package libavahi-common3.
Unpacking libavahi-common3 (from .../libavahi-common3_0.6.23-3lenny2_i386.deb) ...
Selecting previously deselected package libavahi-core5.
Unpacking libavahi-core5 (from .../libavahi-core5_0.6.23-3lenny2_i386.deb) ...
Selecting previously deselected package libdaemon0.
Unpacking libdaemon0 (from .../libdaemon0_0.12-2lenny1_i386.deb) ...
Selecting previously deselected package libdbus-1-3.
Unpacking libdbus-1-3 (from .../libdbus-1-3_1.2.1-5+lenny1_i386.deb) ...
Selecting previously deselected package dbus.
Unpacking dbus (from .../dbus_1.2.1-5+lenny1_i386.deb) ...
Selecting previously deselected package avahi-daemon.
Unpacking avahi-daemon (from .../avahi-daemon_0.6.23-3lenny2_i386.deb) ...
Selecting previously deselected package dbus-x11.
Unpacking dbus-x11 (from .../dbus-x11_1.2.1-5+lenny1_i386.deb) ...
Selecting previously deselected package gsfonts.
Unpacking gsfonts (from .../gsfonts_1%3a8.11+urwcyr1.0.7~pre44-3_all.deb) ...
Selecting previously deselected package libxfont1.
Unpacking libxfont1 (from .../libxfont1_1%3a1.3.3-1_i386.deb) ...
Selecting previously deselected package xfonts-encodings.
Unpacking xfonts-encodings (from .../xfonts-encodings_1%3a1.0.2-3_all.deb) ...
Selecting previously deselected package xfonts-utils.
Unpacking xfonts-utils (from .../xfonts-utils_1%3a7.4+1_i386.deb) ...
Selecting previously deselected package gsfonts-x11.
Unpacking gsfonts-x11 (from .../gsfonts-x11_0.21_all.deb) ...
Selecting previously deselected package libasound2.
Unpacking libasound2 (from .../libasound2_1.0.16-2_i386.deb) ...
Selecting previously deselected package libnss-mdns.
Unpacking libnss-mdns (from .../libnss-mdns_0.10-3_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for fontconfig ...
Setting up java-common (0.30) ...
Setting up odbcinst1debian1 (2.2.11-16) ...
Setting up unixodbc (2.2.11-16) ...
Setting up libavahi-common-data (0.6.23-3lenny2) ...
Setting up libavahi-common3 (0.6.23-3lenny2) ...
Setting up libavahi-core5 (0.6.23-3lenny2) ...
Setting up libdaemon0 (0.12-2lenny1) ...
Setting up libdbus-1-3 (1.2.1-5+lenny1) ...
Setting up dbus (1.2.1-5+lenny1) ...
Adding system user `messagebus' (UID 104) ...
Adding new group `messagebus' (GID 109) ...
Adding new user `messagebus' (UID 104) with group `messagebus' ...
Not creating home directory `/var/run/dbus'.
Starting system message bus: dbus.
Setting up avahi-daemon (0.6.23-3lenny2) ...
Reloading system message bus config...done.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Setting up dbus-x11 (1.2.1-5+lenny1) ...
Setting up gsfonts (1:8.11+urwcyr1.0.7~pre44-3) ...
(Re-)registering PostScript fonts...
Updating fontconfig cache for /usr/share/fonts/type1/gsfonts
done.
Setting up libxfont1 (1:1.3.3-1) ...
Setting up xfonts-encodings (1:1.0.2-3) ...
Setting up xfonts-utils (1:7.4+1) ...
Setting up gsfonts-x11 (0.21) ...
Setting up libasound2 (1.0.16-2) ...
Setting up libnss-mdns (0.10-3) ...
First installation detected...
Checking NSS setup...
Setting up sun-java6-jre (6-20-0lenny1) ...
Setting up sun-java6-bin (6-20-0lenny1) ...
Could not create the Java virtual machine.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Ignoring error generating classes.jsa
During the above install, a screen pops up asking to accept the licence agreement. How can this be automated during a DAB install?
 
Last edited:
During the above install, a screen pops up asking to accept the licence agreement. How can this be automated during a DAB install?

It is not possible to remove that due to license restrictions (totally useless, but required by sun).
 
You need to limit/configure the memory usage for java (i have no idea how to do that). There are various post about the problem on this forum.
 
Re: DAB install of sun-java6-jre fails - SOLVED

This article was very useful in solving this issue. Offline PDF View attachment JRE6Debian.zip.
Code:
http://orkus.wordpress.com/2010/07/06/howto-install-suns-java-6-on-debain-lenny/

JRE 6 needs the dummy X package and needs to have the /etc/X11/xorg.conf re-configured to make it's Device section like:
Code:
Section "Device"
 Identifier "Configured Video Device"
 Option  "UseFBDev"  "true"
EndSection
The Option line above is the newly added entry.

The following steps installed Java Runtime 6 successfully in Debian Lenny:
Code:
apt-get -t lenny-backports install xserver-xorg-video-dummy
dpkg-reconfigure xserver-xorg
apt-get lenny-backports install sun-java6-jre
Whilst the lenny-backports did not have anything special for JRE, the only package it could contribute now for the dummy X was libasound2 1.0.22-2~bpo50+2.

Append the following line to /root/.bashrc:
Code:
export JAVA_HOME=/usr/lib/jvm/java-6-sun

Logout and login again or manually execute the appended line above and check that Java RE 6 is installed and working correctly:
Code:
# echo $JAVA_HOME
/usr/lib/jvm/java-6-sun
 
# java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode)
 
Last edited:
Re: Silent Install of JRE - SOLVED

Solved the auto answer for sun-java6-jre install.
Create a file jrelicence.txt populated with the following content:
Code:
sun-java5-jdk shared/accepted-sun-dlj-v1-1 select true
sun-java5-jre shared/accepted-sun-dlj-v1-1 select true
sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true
sun-java6-jre shared/accepted-sun-dlj-v1-1 select true
The execute:
Code:
/usr/bin/debconf-set-selections jrelicence.txt
apt-get install sun-java6-jre
# or if inside DAB:
# dab install sun-java6-jre
echo >> /root/.bashrc
echo "export JAVA_HOME=/usr/lib/jvm/java-6-sun" >> /root/.bashrc
Now logout of the SSH and login again and check that JRE is running:
Code:
# echo $JAVA_HOME
/usr/lib/jvm/java-6-sun
 
# java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!