使用“sudo update alternatives”时出错

使用“sudo update alternatives”时出错
$ sudo update-alternatives --install "usr/bin/java" "java" "usr/lib/java/jdk1.8.0_144/bin/java" 1
update-alternatives: error: alternative link is not absolute as it should be: usr/bin/java

大家帮帮我,我遗漏了什么?

答案1

我相信这一点:

sudo update-alternatives --install "usr/bin/java" "java" "usr/lib/java/jdk1.8.0_144/bin/java" 1

应该:

sudo update-alternatives --install /usr/bin/java java /usr/lib/java/jdk1.8.0_144/bin/java 1

相关内容