openjdk-8-jre-headless :取决于:ca-certificates-java 但不会安装它

openjdk-8-jre-headless :取决于:ca-certificates-java 但不会安装它

无法安装Java8

apt-get install 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 : Depends: ca-certificates-java but it is not going to be installed
E: Unable to correct problems, you have held broken packages

我搜索了 Google,并添加了存储库和其他建议,但还没有任何东西允许我安装 Java 8。

想法?

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.7 (jessie)
Release:        8
Codename:       jessie

答案1

这是杰西吗?带向后移植

apt install -t jessie-backports  openjdk-8-jre-headless ca-certificates-java

答案2

Jessie 向后移植无法正常工作。我尝试了拉伸并安装了。

echo 'deb http://ftp.au.debian.org/debian/ stretch main contrib non-free' > /etc/apt/sources.list.d/stretch.list && \
apt-get update && \
apt-get install -y --no-install-recommends openjdk-8-jre-headless && \
rm /etc/apt/sources.list.d/stretch.list && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

PS:自从来到这里,我就用了澳大利亚的镜子。从中选择最适合您的这里

答案3

这对我很有用,非常感谢,请注意,您的回声中有一个额外的“deb”,我必须删除,我也在奥兹国,但这现在应该适用于所有存储库,似乎这是固定 java 列表的证书的问题版本

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851667

答案4

这对我有用

apt-get install software-properties-common
add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
apt-get update
apt-get install oracle-java8-installer

转介指南

相关内容