3

I am currently using Debian Stretch (testing, at the moment). I need to install Java 7 32-bit to be able to work with an old applet that is only compatible with that specific version: No 64-bit, no Java 8 (please don't judge me).

There's currently no openjdk-7-jre package available in testing, only openjdk-7-jre, which is not even available for i386 architecture and also not enough to run the applet.

I came across the idea to pin it from the stable release (Jessie), so I added the following files:

/etc/apt/sources.list.d/stable.list

deb http://ftp.caliu.cat/debian/ stable main contrib non-free
deb-src http://ftp.caliu.cat/debian/ stable main contrib non-free

deb http://security.debian.org/ stable/updates main contrib non-free
deb-src http://security.debian.org/ stable/updates main contrib non-free

# stable-updates, previously known as 'volatile'
deb http://ftp.caliu.cat/debian/ stable-updates main contrib non-free
deb-src http://ftp.caliu.cat/debian/ stable-updates main contrib non-free

/etc/apt/preferences.conf

Package: *
Pin: release a=stable
Pin-Priority: 100

Now, I can find package openjdk-7-jre:i386, however, when I try to install it via apt-get -t stable install openjdk-7-jre:i386 I'm getting this:

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: openjdk-7-jre-headless:i386 (= 7u111-2.6.7-1~deb8u1) but it is not going to be installed
                      Depends: libatk1.0-0:i386 (>= 1.12.4) but it is not going to be installed
                      Depends: libcairo2:i386 (>= 1.2.4) but it is not going to be installed
                      Depends: libfontconfig1:i386 (>= 2.11) but it is not going to be installed
                      Depends: libfreetype6:i386 (>= 2.2.1) but it is not going to be installed
                      Depends: libgdk-pixbuf2.0-0:i386 (>= 2.22.0) but it is not going to be installed
                      Depends: libgtk2.0-0:i386 (>= 2.8.0) but it is not going to be installed
                      Depends: libpango-1.0-0:i386 (>= 1.14.0) but it is not going to be installed
                      Depends: libpangocairo-1.0-0:i386 (>= 1.14.0) but it is not going to be installed
                      Depends: libpangoft2-1.0-0:i386 (>= 1.14.0) but it is not going to be installed
                      Depends: libx11-6:i386 but it is not going to be installed
                      Depends: libxcomposite1:i386 (>= 1:0.3-1) but it is not going to be installed
                      Depends: libxext6:i386 but it is not going to be installed
                      Depends: libxi6:i386 but it is not going to be installed
                      Depends: libxrender1:i386 but it is not going to be installed
                      Depends: libxtst6:i386 but it is not going to be installed
                      Depends: libxrandr2:i386 but it is not going to be installed
                      Depends: libxinerama1:i386 but it is not going to be installed
                      Depends: libgl1-mesa-glx:i386 but it is not going to be installed or
                               libgl1:i386
                      Depends: libatk-wrapper-java-jni:i386 (>= 0.30.4-0ubuntu2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I'm not very experienced with Apt-pinning, so I tried other Pin-Priority values with the same luck.

Of course I could download the openJDK-7 JRE 32-bit version by myself and install it but I would really prefer to use the package manager, where possible, can anyone give me a hint of what I'm doing wrong?

Thank you!

2

There are a couple of changes between stable and testing (libgif4 and tzdata-java) which will make it very hard to use the stable versions of openjdk-7-jre.

Instead, since you're running testing, you should use the version currently available in experimental; add

deb http://ftp.caliu.cat/debian/ experimental main
deb-src http://ftp.caliu.cat/debian/ experimental main

to your repositories, apt-get update, and then you should be able to install openjdk-7-jre:i386.

  • That made the trick to install open-jdk-7-jre and run the applet, thanks. Now I'm stuck at a further point, I just realized I also need icedtea-7-plugin for it to work, which is also not available, not even in experimental :/ – poinu Aug 12 '16 at 6:53
  • Given icedtea-7-plugin's dependencies, it should be possible to install the stable version on a testing system with the experimental JRE (what a mixture!). – Stephen Kitt Aug 12 '16 at 7:20
  • That actually worked (al least for now :P). Thank you! – poinu Aug 22 '16 at 14:42
1

Installing packages multi-arch is mostly asking for a lot of pain.

Installing a specific package from the non-pinned repo does not automatically install all its dependencies as well. You could try listing all dependencies in your apt-get command.

Although I commend you wanting to use packages all the way, I think you might want to reconsider in this case.

Personally I might even try to run the application in a Docker container so as not to contaminate the rest of the host, but that's a whole other ball game.

  • Running the applet in a container would be a good solution in most cases, however, in my case, I need to run an old VPN client (definitely not my decision) and I believe doing so within a container would be more of a hassle! – poinu Aug 12 '16 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.