所以,在通过putty连接CentOS 7后,我正在尝试更新我的Java,因为当前版本为1.6.0。
我已经安装了正确的JDK,但现在我必须编辑备选项,当我尝试这样做时,我收到以下提示:
[mcserver@e3-1240v3 ~]$ alternatives --config java
There are 5 programs which provide 'java'.
Selection Command
-----------------------------------------------
+ 1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
2 /opt/jdk1.8.0_171/bin/java
* 3 /usr/java/jdk-10.0.1/bin/java
4 /usr/java/jre-10.0.1/bin/java
5 /usr/java/jdk1.8.0_172-amd64/jre/bin/java
Enter to keep the current selection[+], or type selection number: 3
failed to create /var/lib/alternatives/java.new: Permission denied
有什么解决方案吗?提前感谢您。