我的服务器当前在 Debian Stretch 上运行:
Linux *** 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
我尝试安装 openjdk-11-jdk。这不是稳定 Stretch 的一部分。所以我根据指示:
德布http://deb.debian.org/debian拉伸向后移植主要
软件包安装失败,依赖项不可用:
536:root:/opt# apt-get update
[...]
537:root:/opt# apt-get -t stretch-backports install "openjdk-11-jdk"
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-11-jdk : Depends: openjdk-11-jre (= 11.0.3+7-5~bpo9+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
538:root:/opt# apt-get -t stretch-backports install "openjdk-11-jre"
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-11-jre : Depends: libgif7 (>= 5.1) but it is not installable
Recommends: libatk-wrapper-java-jni (>= 0.30.4-0ubuntu2) but it is not installable
E: Unable to correct problems, you have held broken packages.
539:root:/opt# aptitude -t stretch-backports install "openjdk-11-jdk"
The following NEW packages will be installed:
openjdk-11-jdk openjdk-11-jdk-headless{a} openjdk-11-jre{ab} openjdk-11-jre-headless{a}
0 packages upgraded, 4 newly installed, 0 to remove and 86 not upgraded.
Need to get 223 MB of archives. After unpacking 364 MB will be used.
The following packages have unmet dependencies:
openjdk-11-jre : Depends: libgif7 (>= 5.1) which is a virtual package and is not provided by any available package
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) openjdk-11-jdk [Not Installed]
2) openjdk-11-jre [Not Installed]
Accept this solution? [Y/n/q/?] q
Abandoning all efforts to resolve these dependencies.
Abort.
我不知道如何解决这些依赖关系。
更新:
599:root:~# apt policy
Package files:
100 /var/lib/dpkg/status
release a=now
100 http://deb.debian.org/debian stretch-backports/main amd64 Packages
release o=Debian Backports,a=stretch-backports,n=stretch-backports,l=Debian Backports,c=main,b=amd64
origin deb.debian.org
500 http://ftp.de.debian.org/debian stretch-updates/main amd64 Packages
release o=Debian,a=oldstable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
origin ftp.de.debian.org
500 http://security.debian.org stretch/updates/main amd64 Packages
release v=9,o=Debian,a=oldstable,n=stretch,l=Debian-Security,c=main,b=amd64
origin security.debian.org
Pinned packages:
答案1
stretch/main
我在输出中看不到apt policy
安装所需的存储库条目libgif7包裹。
尝试这个:
将主存储库添加到您的
/etc/apt/sources.list
:deb http://ftp.de.debian.org/debian stretch main
然后运行
apt-get update apt-get -t stretch-backports install openjdk-11-jdk