安装jdk报错

超级流浪汉 2022-06-221088 次点击
刚到手的像安装jdk,安装到一半发现太慢,本能Ctrl+c然后去搜了搜换了源再安装但是报错说我丢失包依赖
如图
root@supertramp:/etc/apt# sudo apt install default-jdk
Reading package lists... Done
Building dependency tree... Done
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:
ca-certificates-java : Depends: default-jre-headless but it is not installable or
java8-runtime-headless but it is not installable
Depends: libnss3 (>= 3.12.10-2~) but it is not installable
libc6 : Depends: libgcc-s1 but it is not installable
Recommends: libnss-nis but it is not installable
Recommends: libnss-nisplus but it is not installable
openjdk-11-jre-headless:armhf : Depends: util-linux:armhf (>= 2.26.2-4)
E: Unable to correct problems, you have held broken packages.
root@supertramp:/etc/apt#
收藏 ♥ 感谢
Spoony 小组长 2022-06-23 
没遇到过,可能是 64 位系统?
还可以试试 jdk 8
https://shumeipai.nxez.com/2021/01/20/how-to-install-java-jdk-on-raspberry-pi.html
mep 90cm 2022-06-29  ♥ 1
可能你更换的源缺某些包,最好更换一个靠谱点的源,然后运行
sudo apt-get install -f
修复你的安装

登录注册 后可回复。