我安装了 Java 9 JDK ( openjdk-9-jdk
),但又将其清除,然后运行。现在只安装了apt autoremove --purge
Java 8 JDK ( )。openjdk-8-jdk
然而,仍有遗留问题:
一些替代方案仍然指向不存在的 Java 9 文件:
$ update-alternatives --get-selections | grep java-9 jjs auto /usr/lib/jvm/java-9-openjdk-amd64/bin/jjs keytool auto /usr/lib/jvm/java-9-openjdk-amd64/bin/keytool orbd auto /usr/lib/jvm/java-9-openjdk-amd64/bin/orbd pack200 auto /usr/lib/jvm/java-9-openjdk-amd64/bin/pack200 rmid auto /usr/lib/jvm/java-9-openjdk-amd64/bin/rmid rmiregistry auto /usr/lib/jvm/java-9-openjdk-amd64/bin/rmiregistry servertool auto /usr/lib/jvm/java-9-openjdk-amd64/bin/servertool tnameserv auto /usr/lib/jvm/java-9-openjdk-amd64/bin/tnameserv unpack200 auto /usr/lib/jvm/java-9-openjdk-amd64/bin/unpack200
这些链接组中没有其他替代方案,因此我无法重新配置它们,所有都返回相同的输出(具有各自的替代名称):
$ update-alternatives --config unpack200 update-alternatives: warning: /etc/alternatives/unpack200 is dangling; it will be updated with best choice There is only one alternative in link group unpack200 (providing /usr/bin/unpack200): /usr/lib/jvm/java-9-openjdk-amd64/bin/unpack200 Nothing to configure.
如果没有候选,我可以简单地安全地删除这些替代方案吗?
里面还
/usr/lib
剩下一个文件:$ ls -lh /usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/server/classes.jsa -r--r--r-- 1 root root 18M Mai 8 22:30 /usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/server/classes.jsa
它不是任何包的一部分(
dpkg -S FILENAME
不返回任何内容),所以我可以安全地将其删除吗?