当我跑步时java -version
,我得到了这个:
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
$JAVA_HOME
设置为/usr/lib/jvm/java-8-oracle
,每当我尝试使用 删除或安装包时apt-get
,我都会在提示继续后收到此信息:
Setting up jre1.8.0-101 (1.8.0101-1) ...
Unpacking JAR files...
plugin.jar...
Error: Could not open input file: /usr/java/jre1.8.0_101/lib/plugin.pack
javaws.jar...
Error: Could not open input file: /usr/java/jre1.8.0_101/lib/javaws.pack
deploy.jar...
Error: Could not open input file: /usr/java/jre1.8.0_101/lib/deploy.pack
rt.jar...
Error: Could not open input file: /usr/java/jre1.8.0_101/lib/rt.pack
jsse.jar...
Error: Could not open input file: /usr/java/jre1.8.0_101/lib/jsse.pack
charsets.jar...
Error: Could not open input file: /usr/java/jre1.8.0_101/lib/charsets.pack
localedata.jar...
Error: Could not open input file: /usr/java/jre1.8.0_101/lib/ext/localedata.pack
update-alternatives: error: alternative ControlPanel can't be slave of java: it is a master alternative
dpkg: error processing package jre1.8.0-101 (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
jre1.8.0-101
E: Sub-process /usr/bin/dpkg returned an error code (1)
我的机器上安装了 Java JRE(位于错误中显示的目录中)和 JDK,在研究了 JRE 是 JDK 的子集之后,我意识到我可能不需要那个额外的 JRE。那么上面指定的 JRE 是否需要?这些错误意味着什么?
任何帮助,将不胜感激。
谢谢。