Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Problem multiarch installing openjdk on wheezy

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
AlexH
Posts: 4
Joined: 2014-03-20 10:24

Problem multiarch installing openjdk on wheezy

#1 Post by AlexH »

Ok so 3 things to get out of the way first:

1) I really like Debian, for many reasons. Community, stability, cleanliness and overall design. Debian rocks.
2) I really really really dislike Ubuntu, for many reasons, but for sake of argument and because im not here to just bash Ubuntu, lets just say i think Ubuntu sucks.
3) What im about to describe works perfectly on Ubuntu *gross sobbing*.

I have a java applet (juniper vpn connect) that i have to use for work. There is no avoiding this and as a support engineer i need VPN access round the clock. I have Ubuntu on my laptop at the minute, but as i mentioned in my opening statement, i am not happy with this at all. I want to use Debian. The problem being that i cannot get this particular java applet to work in Debian wheezy, and its a deal breaker at the minute.

Please note i am not asking for support on this particular java applet, java itself or Ubuntu, only Debian's multiarch capability like the title says.

So with that overly long preamble out of the way, here is the problem. This particular applet required 32-bit JRE, and i am using a 64-bit system. Lucky for me wheezy has multiarch support. So i have installed openjdk-7-jre and icedtea-7-plugin (both needed for firefox to work with the applet) however i must be doing something wrong when i try to get the 32-bit JRE installed alongside 64-bit JRE.

I followed this guide: https://wiki.debian.org/Multiarch/HOWTO

Then did the following:

Code: Select all

root@debbie:~# dpkg --print-architecture
amd64

Code: Select all

root@debbie:~# uname -a
Linux debbie 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
Yep, 64 bit system alright.

Code: Select all

root@debbie:~# dpkg --add-architecture i386
Just returns the prompt, but thats expected.

Code: Select all

root@debbie:~# dpkg --print-foreign-architectures
i386
Cool. I do an apt-get update and i can see from the output of that, that both amd64 and i386 repo's are being cached.

Then, i install the needful bits of openjdk:

Code: Select all

root@debbie:~# apt-get install openjdk-7-jre
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  icedtea-7-jre-jamvm openjdk-7-jre-headless openjdk-7-jre-lib
Suggested packages:
  icedtea-7-plugin sun-java6-fonts fonts-ipafont-gothic fonts-ipafont-mincho
  ttf-wqy-microhei ttf-wqy-zenhei ttf-indic-fonts
The following NEW packages will be installed:
  icedtea-7-jre-jamvm openjdk-7-jre openjdk-7-jre-headless openjdk-7-jre-lib
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 41.9 MB of archives.
After this operation, 58.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://security.debian.org/ wheezy/updates/main openjdk-7-jre-lib all 7u25-2.3.10-1~deb7u1 [5,541 kB]
Get:2 http://security.debian.org/ wheezy/updates/main openjdk-7-jre-headless amd64 7u25-2.3.10-1~deb7u1 [35.5 MB]
Get:3 http://security.debian.org/ wheezy/updates/main openjdk-7-jre amd64 7u25-2.3.10-1~deb7u1 [230 kB]
Get:4 http://security.debian.org/ wheezy/updates/main icedtea-7-jre-jamvm amd64 7u25-2.3.10-1~deb7u1 [631 kB]
Fetched 41.9 MB in 3min 27s (202 kB/s)                                         
Selecting previously unselected package openjdk-7-jre-lib.
(Reading database ... 138362 files and directories currently installed.)
Unpacking openjdk-7-jre-lib (from .../openjdk-7-jre-lib_7u25-2.3.10-1~deb7u1_all.deb) ...
Selecting previously unselected package openjdk-7-jre-headless:amd64.
Unpacking openjdk-7-jre-headless:amd64 (from .../openjdk-7-jre-headless_7u25-2.3.10-1~deb7u1_amd64.deb) ...
Selecting previously unselected package openjdk-7-jre:amd64.
Unpacking openjdk-7-jre:amd64 (from .../openjdk-7-jre_7u25-2.3.10-1~deb7u1_amd64.deb) ...
Selecting previously unselected package icedtea-7-jre-jamvm:amd64.
Unpacking icedtea-7-jre-jamvm:amd64 (from .../icedtea-7-jre-jamvm_7u25-2.3.10-1~deb7u1_amd64.deb) ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Setting up openjdk-7-jre-headless:amd64 (7u25-2.3.10-1~deb7u1) ...
Setting up openjdk-7-jre:amd64 (7u25-2.3.10-1~deb7u1) ...
Setting up icedtea-7-jre-jamvm:amd64 (7u25-2.3.10-1~deb7u1) ...
Setting up openjdk-7-jre-lib (7u25-2.3.10-1~deb7u1) ...
So far so good.

Now lets try and get the 32-bit libs installed as well.

Code: Select all

root@debbie:~# apt-get install openjdk-7-jre:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openjdk-7-jre:i386 : Depends: libgif4:i386 (>= 4.1.4) but it is not going to be installed
                      Recommends: libgnome2-0:i386 but it is not going to be installed
                      Recommends: libgnomevfs2-0:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Ah. No problem, trusty aptitude will help resolve this.

Code: Select all

root@debbie:~# aptitude install openjdk-7-jre:i386
The following NEW packages will be installed:
  cpp:i386{ab} cpp-4.7:i386{ab} gcc-4.7-base:i386{a} icedtea-7-jre-jamvm:i386{a} libacl1:i386 libasound2:i386{a} libasyncns0:i386{a} 
  libatk-wrapper-java-jni:i386{a} libatk1.0-0:i386{a} libattr1:i386{a} libavahi-client3:i386{a} libavahi-common-data:i386{a} 
  libavahi-common3:i386{a} libavahi-glib1:i386 libbonobo2-0:i386{ab} libc6:i386{a} libc6-i686:i386{a} libcairo2:i386{a} 
  libcanberra0:i386{a} libcap2:i386{a} libcomerr2:i386{a} libcups2:i386{a} libdatrie1:i386{a} libdbus-1-3:i386{a} 
  libdbus-glib-1-2:i386{a} libdrm-intel1:i386{a} libdrm-nouveau1a:i386{a} libdrm-radeon1:i386{a} libdrm2:i386{a} libexpat1:i386{a} 
  libfam0:i386{b} libffi5:i386{a} libflac8:i386{a} libfontconfig1:i386{a} libfreetype6:i386{a} libgcc1:i386{a} libgconf-2-4:i386{a} 
  libgconf2-4:i386{a} libgcrypt11:i386{a} libgdk-pixbuf2.0-0:i386{a} libgif4:i386{ab} libgl1-mesa-dri:i386{a} libgl1-mesa-glx:i386{a} 
  libglapi-mesa:i386{a} libglib2.0-0:i386{a} libgmp10:i386{a} libgnome2-0:i386{ab} libgnomevfs2-0:i386{ab} libgnutls26:i386{a} 
  libgpg-error0:i386{a} libgssapi-krb5-2:i386{a} libgtk2.0-0:i386{a} libice6:i386{a} libidl0:i386{ab} libjasper1:i386{a} libjbig0:i386 
  libjpeg8:i386{a} libjson0:i386{a} libk5crypto3:i386{a} libkeyutils1:i386{a} libkrb5-3:i386{a} libkrb5support0:i386{a} 
  liblcms2-2:i386{a} libltdl7:i386{a} liblzma5:i386{a} libmpc2:i386{a} libmpfr4:i386{a} libnspr4:i386{a} libnss3:i386{a} 
  libogg0:i386{a} liborbit2:i386{ab} libp11-kit0:i386{a} libpango1.0-0:i386{a} libpciaccess0:i386{a} libpcre3:i386{a} 
  libpcsclite1:i386{a} libpixman-1-0:i386{a} libpng12-0:i386{a} libpopt0:i386{a} libpulse0:i386{a} libselinux1:i386{a} libsm6:i386{a} 
  libsndfile1:i386{a} libsqlite3-0:i386{a} libstdc++6:i386{a} libtasn1-3:i386{a} libtdb1:i386{a} libthai0:i386{a} libtiff4:i386{a} 
  libuuid1:i386{a} libvorbis0a:i386{a} libvorbisenc2:i386{a} libvorbisfile3:i386{a} libwrap0:i386{a} libx11-6:i386{a} 
  libx11-xcb1:i386{a} libxau6:i386{a} libxcb-glx0:i386{a} libxcb-render0:i386{a} libxcb-shm0:i386{a} libxcb1:i386{a} 
  libxcomposite1:i386{a} libxcursor1:i386{a} libxdamage1:i386{a} libxdmcp6:i386{a} libxext6:i386{a} libxfixes3:i386{a} libxft2:i386{a} 
  libxi6:i386{a} libxinerama1:i386{a} libxml2:i386 libxrandr2:i386{a} libxrender1:i386{a} libxtst6:i386{a} libxxf86vm1:i386{a} 
  openjdk-7-jre:i386 openjdk-7-jre-headless:i386{a} uuid-runtime{a} zlib1g:i386{a} 
The following packages are RECOMMENDED but will NOT be installed:
  libgnomevfs2-extra:i386 
0 packages upgraded, 119 newly installed, 0 to remove and 0 not upgraded.
Need to get 95.9 MB of archives. After unpacking 226 MB will be used.
The following packages have unmet dependencies:
 libgnome2-0 : Conflicts: libgnome2-0:i386 but 2.32.1-3 is to be installed.
 libgnome2-0:i386 : Depends: libgnome2-common:i386 (>= 2.32) which is a virtual package.
                    Depends: libgnome2-common:i386 (< 2.33) which is a virtual package.
                    Depends: gvfs:i386 but it is not going to be installed.
                    Conflicts: libgnome2-0 but 2.32.1-3 is installed.
 libbonobo2-0 : Conflicts: libbonobo2-0:i386 but 2.24.3-1 is to be installed.
 libbonobo2-0:i386 : Depends: libbonobo2-common:i386 (= 2.24.3-1) which is a virtual package.
                     Conflicts: libbonobo2-0 but 2.24.3-1 is installed.
 libfam0 : Conflicts: libfam0:i386 but 2.7.0-17 is to be installed.
 libfam0:i386 : Conflicts: libfam0 but 2.7.0-17 is installed.
 cpp : Conflicts: cpp:i386 but 4:4.7.2-1 is to be installed.
 cpp:i386 : Conflicts: cpp but 4:4.7.2-1 is installed.
 libgif4 : Conflicts: libgif4:i386 but 4.1.6-10 is to be installed.
 libgif4:i386 : Conflicts: libgif4 but 4.1.6-10 is installed.
 libgnomevfs2-0 : Conflicts: libgnomevfs2-0:i386 but 1:2.24.4-2 is to be installed.
 libgnomevfs2-0:i386 : Depends: libgnomevfs2-common:i386 (>= 1:2.24) which is a virtual package.
                       Depends: libgnomevfs2-common:i386 (< 1:2.25) which is a virtual package.
                       Conflicts: libgnomevfs2-0 but 1:2.24.4-2 is installed.
 libidl0 : Conflicts: libidl0:i386 but 0.8.14-0.2 is to be installed.
 libidl0:i386 : Conflicts: libidl0 but 0.8.14-0.2 is installed.
 liborbit2 : Conflicts: liborbit2:i386 but 1:2.14.19-0.1 is to be installed.
 liborbit2:i386 : Conflicts: liborbit2 but 1:2.14.19-0.1 is installed.
 cpp-4.7 : Conflicts: cpp-4.7:i386 but 4.7.2-5 is to be installed.
 cpp-4.7:i386 : Conflicts: cpp-4.7 but 4.7.2-5 is installed.
The following actions will resolve these dependencies:

      Remove the following packages:                                                                                                        
1)      browser-plugin-gnash                                                                                                                
2)      cpp                                                                                                                                 
3)      cpp-4.7                                                                                                                             
4)      default-jre                                                                                                                         
5)      dkms                                                                                                                                
6)      gcc                                                                                                                                 
7)      gcc-4.7                                                                                                                             
8)      gdm3                                                                                                                                
9)      gnash                                                                                                                               
10)     gnash-common                                                                                                                        
11)     gnome                                                                                                                               
12)     gnome-core                                                                                                                          
13)     gnome-mag                                                                                                                           
14)     hamster-applet                                                                                                                      
15)     icedtea-7-plugin                                                                                                                    
16)     icedtea-netx                                                                                                                        
17)     libatspi1.0-0                                                                                                                       
18)     libbonobo2-0                                                                                                                        
19)     libbonoboui2-0                                                                                                                      
20)     libgdiplus                                                                                                                          
21)     libgif4                                                                                                                             
22)     libgnome-mag2                                                                                                                       
23)     libgnome2-0                                                                                                                         
24)     libgnomeui-0                                                                                                                        
25)     libgtk2.0-cil                                                                                                                       
26)     libidl0                                                                                                                             
27)     libmono-addins-gui0.2-cil                                                                                                           
28)     libmono-system-drawing4.0-cil                                                                                                       
29)     liborbit2                                                                                                                           
30)     libreoffice                                                                                                                         
31)     libreoffice-base                                                                                                                    
32)     libreoffice-evolution                                                                                                               
33)     libreoffice-filter-mobiledev                                                                                                        
34)     libreoffice-report-builder-bin                                                                                                      
35)     openjdk-6-jre                                                                                                                       
36)     openjdk-7-jre                                                                                                                       
37)     python-gnome2                                                                                                                       
38)     python-pyorbit                                                                                                                      
39)     task-desktop                                                                                                                        
40)     task-gnome-desktop                                                                                                                  
41)     tomboy                                                                                                                              
42)     tracker-extract                                                                                                                     
43)     tracker-miner-fs                                                                                                                    
44)     virtualbox-guest-dkms                                                                                                               
45)     x11-apps                                                                                                                            
46)     x11-session-utils                                                                                                                   
47)     x11-xserver-utils                                                                                                                   
48)     xorg                                                                                                                                

      Keep the following packages at their current version:                                                                                 
49)     libbonobo2-0:i386 [Not Installed]                                                                                                   
50)     libfam0:i386 [Not Installed]                                                                                                        
51)     libgnome2-0:i386 [Not Installed]                                                                                                    
52)     libgnomevfs2-0:i386 [Not Installed]                                                                                                 

      Leave the following dependencies unresolved:                                                                                          
53)     gnome-orca recommends gnome-mag (>= 0.12.5)                                                                                         
54)     libreoffice-writer recommends default-jre | gcj-jre | java-gcj-compat | openjdk-6-jre | openjdk-7-jre | sun-java5-jre | sun-java6-jr
55)     task-desktop recommends task-gnome-desktop | task-kde-desktop | task-lxde-desktop | task-xfce-desktop                               
56)     task-gnome-desktop recommends gnome                                                                                                 
57)     tracker recommends tracker-miner-fs                                                                                                 
58)     unoconv recommends libreoffice                                                                                                      
59)     xdg-utils recommends x11-xserver-utils                                                                                              
60)     openjdk-7-jre recommends libgnome2-0                                                                                                
61)     virtualbox-guest-utils recommends virtualbox-guest-dkms (= 4.1.18-dfsg-2+deb7u2) | virtualbox-guest-source (= 4.1.18-dfsg-2+deb7u2) 
62)     openjdk-7-jre:i386 recommends libgnome2-0:i386                                                                                      
63)     openjdk-7-jre:i386 recommends libgnomevfs2-0:i386                                                                                   


Accept this solution? Y/n/q/?
Oh figs. No, this is not an acceptable solution. At all.

I'm a bit bummed by this but i am convinced i am doing something wrong, rather than it being a flaw in the Debian system. So can someone help me spot what it is that i'm not getting?

A few extra bits, like i said this annoyingly works right off the bat in Ubuntu, here is a guide on doing so and i can confirm this indeed does work: http://askubuntu.com/questions/136194/j ... p-on-12-04

Is it just that Ubuntu happily installs a ton of broken packages?

The only other reference i can find which is not totally anecdotal is this:
http://www.juniper.net/techpubs/en_US/s ... pport.html but now i know that this works semi "out of the box" on Ubuntu i would hope i could get it working in Debian.

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

Re: Problem multiarch installing openjdk on wheezy

#2 Post by Issyer »

I haven't tried but according to Oracle you can run 32 bit jre right on 64 bit machine.
On a 64-bit system, you can download either the 64-bit or the 32-bit version of the Java platform.
http://www.oracle.com/technetwork/java/ ... 40230.html

AlexH
Posts: 4
Joined: 2014-03-20 10:24

Re: Problem multiarch installing openjdk on wheezy

#3 Post by AlexH »

Thanks for the quick response Issyer, however the problem is not whether or not multilib java is possible, as i know it is and as mentioned i have it working just so elsewhere, but i just cant for the life of me figure out how to get apt to safely install both 32 and 64 bit versions of the openjdk runtime.

The real headache is that on a certain debian derived distro, it "just works" which is hella annoying as its the only thing keeping me from going full blown debian. Maybe there are some 32 bit compatibility libraries i am missing?

A lot of the resources talk about installing both 32 and 64 bit jre alongside each other and then using the alternatives command to update the symlinks, but that is just replacing my 64 bit jre with a 32 bit jre right? well thats not what im trying to do either.

Edit: Also i have considered using oracles java, but have found that requires a lot of weird workarounds with "alternatives --config" as well, plus its not maintained in the main repo which is a pain.

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

Re: Problem multiarch installing openjdk on wheezy

#4 Post by Issyer »

It depends on what you are doing. If you want to run just one applet, i would suggest using Oracle JRE which doesn't require dependencies and can be put into /opt. Then you can export JAVA home variable pointed to this particular JRE for a certain application. Like

Code: Select all

#!/bin/bash
export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin

/usr/bin/firefox
Or you can isolate 32 bit java from the repos entirely in a virtual machine. It's all up to you.

AlexH
Posts: 4
Joined: 2014-03-20 10:24

Re: Problem multiarch installing openjdk on wheezy

#5 Post by AlexH »

Ok thanks a lot Issyer thats given me some ideas about how to get this working. Will most probably set up an lxc container and just load a 32 bit system in there for work.

One last question - how then does debian handle mutliarch installs? As this is really what i am not grasping, to my understanding multiarch/multilib allows for different architectures to be installed side by side, for example 32 bit and 64 bit openjdk. Am i understanding this incorrectly?

User avatar
Issyer
Posts: 3032
Joined: 2007-05-23 02:59
Location: Khakassia

Re: Problem multiarch installing openjdk on wheezy

#6 Post by Issyer »

I am not exactly sure. I think the issue is explained here:
http://wiki.debian.org/Multiarch/Implementation

AlexH
Posts: 4
Joined: 2014-03-20 10:24

Re: Problem multiarch installing openjdk on wheezy

#7 Post by AlexH »

Thanks for all the help issyer

mayaknife
Posts: 5
Joined: 2013-02-09 13:14

Re: Problem multiarch installing openjdk on wheezy

#8 Post by mayaknife »

I've just run into the same problem. Apparently the crux of the matter is that openjdk depends on libgif4 which is not multiarch-aware in Wheezy stable. Apparently there is an updated libgif4 in unstable.

Disclaimer: I'm a debian n00b so I'm not even sure that I'm using all of the terms in the above paragraph correctly.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Problem multiarch installing openjdk on wheezy

#9 Post by stevepusser »

Aren't Java applications architecture-independent, like scripts or Python? Why can't the 64-bit version run it?
MX Linux packager and developer

jordi13
Posts: 1
Joined: 2014-12-14 10:44

Re: Problem multiarch installing openjdk on wheezy

#10 Post by jordi13 »

can't you just choose which java to use?

sudo update-java-alternatives -l

lists available ones, then choose which you want, ie

sudo update-java-alternatives -s java-7-oracle

So your original OpenJDK installation won't be overwritten and you can switch between them.

Post Reply