![Debian Stretch 64 位上的 OpenJDK7 JRE 32 位](https://linux22.com/image/92191/Debian%20Stretch%2064%20%E4%BD%8D%E4%B8%8A%E7%9A%84%20OpenJDK7%20JRE%2032%20%E4%BD%8D.png)
我目前正在使用 Debian Stretch(目前正在测试)。我需要安装Java 7 32 位能够使用仅与该特定版本兼容的旧小程序:没有 64 位,没有 Java 8(请不要评判我)。
目前还没有openjdk-7-jre
可供测试的软件包,只有openjdk-7-jre
,它甚至不适用于 i386 架构,也不足以运行小程序。
我想到了从稳定版本(Jessie)中固定它的想法,所以我添加了以下文件:
/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
现在,我可以找到 package openjdk-7-jre:i386
,但是,当我尝试通过安装它时,apt-get -t stable 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: 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.
我对 Apt-pinning 不太有经验,所以我尝试了其他引脚优先价值观具有同样的运气。
当然,我可以自己下载 openJDK-7 JRE 32 位版本并安装它,但我真的更喜欢使用包管理器,在可能的情况下,任何人都可以提示我做错了什么吗?
谢谢你!
答案1
libgif4
稳定版本和测试版本之间有一些变化,tzdata-java
这将使使用稳定版本变得非常困难openjdk-7-jre
。
相反,由于您正在运行测试,因此您应该使用当前在实验中可用的版本;添加
deb http://ftp.caliu.cat/debian/ experimental main
deb-src http://ftp.caliu.cat/debian/ experimental main
到您的存储库,apt-get update
然后您应该能够安装openjdk-7-jre:i386
。
答案2
安装多架构软件包通常会带来很多痛苦。
从非固定存储库安装特定包也不会自动安装其所有依赖项。您可以尝试在 apt-get 命令中列出所有依赖项。
尽管我建议您一直想使用包,但我认为在这种情况下您可能需要重新考虑。
就我个人而言,我什至可能会尝试在 Docker 容器中运行应用程序,以免污染主机的其余部分,但这完全是另一回事。