首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在debian上从openjdk-7升级到openjdk-8

在debian上从openjdk-7升级到openjdk-8
EN

Unix & Linux用户
提问于 2018-10-30 10:11:51
回答 1查看 969关注 0票数 0

我在我的Debian 8计算机上安装了以下与Java相关的软件包

代码语言:javascript
复制
# sudo dpkg -l | grep -i java
ii  ca-certificates-java           20140324                         all          Common CA certificates (JKS keystore)
ii  java-common                    0.52                             all          Base of all Java packages
ii  libatk-wrapper-java            0.30.5-1                         all          ATK implementation for Java using JNI
ii  libatk-wrapper-java-jni:amd64  0.30.5-1                         amd64        ATK implementation for Java using JNI (JNI bindings)
ii  openjdk-7-jre:amd64            7u181-2.6.14-1~deb8u1            amd64        OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-7-jre-headless:amd64   7u181-2.6.14-1~deb8u1            amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
ii  tzdata-java                    2018e-0+deb8u1                   all          time zone and daylight-saving time data for use by java runtimes

我只想安装Java 8,但我经常遇到依赖关系问题:

代码语言:javascript
复制
# sudo apt install openjdk-8-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-8-jre : Depends: openjdk-8-jre-headless (= 8u171-b11-1~bpo8+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


# sudo apt install openjdk-8-jre openjdk-8-jre-headless
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-8-jre-headless : Breaks: ca-certificates-java (< 20160321~) but 20140324 is to be installed
E: Unable to correct problems, you have held broken packages.

如何升级到Java 8,同时解决所有依赖关系问题?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2018-10-30 10:18:27

您需要告诉apt考虑支持的包:

代码语言:javascript
复制
apt -t jessie-backports install openjdk-8-jre
票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/478627

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档