所以,在CentOS 7上通过putty我试图更新我的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
任何解决方案?提前谢谢。
答案 0 :(得分:0)
您需要sudo
命令,或更改chmod
目录的权限(/var/lib/alternatives
)并最终创建它(如果它不存在)