首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Debian上安装JDK 8

在Debian上安装JDK 8
EN

Unix & Linux用户
提问于 2016-11-20 21:29:29
回答 2查看 6.6K关注 0票数 2

我试图在Debian上安装JDK 8。我发现了很多类似的话题,但都没有解决我的问题。在大多数主题中,解决方案是以下命令

代码语言:javascript
复制
sudo apt-get install software-properties-common
sudo apt-get install python-software-properties

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk

但我有个错误

正在读取包列表...创建依赖树读取状态信息..。一些软件包无法安装。这可能意味着您已经请求了一个不可能的情况,或者如果您使用的是一些所需的包尚未创建或移出传入的不稳定发行版。以下信息可能有助于解决这种情况:下面的包有未满足的依赖关系: openjdk-8-jdk :依赖: openjdk-8-jre (= 8u111-b14-2~bpo8+1),但它不会安装取决于:OpenJDK-8-JDK无头包(= 8u111-b14-2~bpo8+1),但是它不会被安装E:无法纠正问题,您已经持有了损坏的包。

我还检查了更新。

代码语言:javascript
复制
sudo update-alternatives --config java

输出是

在链接组java中只有一种选择(提供/usr/bin/java):/usr/lib/jvm/java-7-OpenJDK-i 386/jre/bin/java,无需配置。

EN

回答 2

Unix & Linux用户

发布于 2016-11-20 23:21:34

openjdk-8在我的默认Jessie/stable中是可用的--只需要apt-获取安装它(openjdk-8-jdk和您想要/需要的任何东西,它推荐的或依赖的)

当然,它可能依赖于您的/etc/apt/ course . file文件,包括cont肋骨和非空闲的存储库。

/etc/apt/ should . like应该类似于

代码语言:javascript
复制
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free
票数 1
EN

Unix & Linux用户

发布于 2017-03-10 11:56:50

这里没有解决的问题..。

# cat /etc/apt/sources.list.列表

代码语言:javascript
复制
#deb hxxp://debian.mirrors.ovh.net/debian/ jessie main contrib non-free
#deb-src hxxp://debian.mirrors.ovh.net/debian/ jessie main contrib non-free

deb hxxp://security.debian.org/ jessie/updates main contrib non-free
deb-src hxxp://security.debian.org/ jessie/updates main contrib non-free

# jessie-updates, previously known as 'volatile'
deb hxxp://debian.mirrors.ovh.net/debian/ jessie-updates main contrib non-free
deb-src hxxp://debian.mirrors.ovh.net/debian/ jessie-updates main contrib non-free

# jessie-backports, previously on backports.debian.org
deb hxxp://debian.mirrors.ovh.net/debian/ jessie-backports main contrib non-free
deb-src hxxp://debian.mirrors.ovh.net/debian/ jessie-backports main contrib non-free

deb hxxp://debian.mirrors.ovh.net/debian/ jessie main contrib non-free
deb-src hxxp://debian.mirrors.ovh.net/debian/ jessie main contrib non-free

# apt-获取安装openjdk-8-jdk

代码语言:javascript
复制
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-jdk : Depends: openjdk-8-jre (= 8u121-b13-1~bpo8+1) but it is not going to be installed
                 Depends: openjdk-8-jdk-headless (= 8u121-b13-1~bpo8+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

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

复制
相关文章

相似问题

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