我试图在Debian上安装JDK 8。我发现了很多类似的话题,但都没有解决我的问题。在大多数主题中,解决方案是以下命令
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:无法纠正问题,您已经持有了损坏的包。
我还检查了更新。
sudo update-alternatives --config java输出是
在链接组java中只有一种选择(提供/usr/bin/java):/usr/lib/jvm/java-7-OpenJDK-i 386/jre/bin/java,无需配置。
发布于 2016-11-20 23:21:34
openjdk-8在我的默认Jessie/stable中是可用的--只需要apt-获取安装它(openjdk-8-jdk和您想要/需要的任何东西,它推荐的或依赖的)
当然,它可能依赖于您的/etc/apt/ course . file文件,包括cont肋骨和非空闲的存储库。
/etc/apt/ should . like应该类似于
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发布于 2017-03-10 11:56:50
这里没有解决的问题..。
#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-freeReading 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.https://unix.stackexchange.com/questions/326377
复制相似问题