本文介绍了在终端中移动usr / bin / java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
更新到OS X 10.11后,我的java停止工作。我读了多个我应该做的地方:
After updating to OS X 10.11, my java stopped working. I read multiple places that I should do a:
sudo mv /usr/bin/java /usr/bin/java.old
sudo ln -ns /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin/java
但问题是当我运行第一行代码时,我得到:
But the issue is when I run the first line of code, I just get:
mv: rename /usr/bin/java to /usr/bin/java.old: Operation not permitted
我有什么想法可以解决这个问题?
Any ideas what I can do to fix this?
推荐答案
好像新的问题系统集成保护(又称无根)。
Seems like the problem with the new System Integration Protection (a.k.a rootless) that just got introduced with the new OS X.
您可以通过以下步骤尝试在恢复模式下禁用无根:
You could try to disable the rootless in recovery mode through these steps :
- 进入恢复模式(重启并按住命令 + 键同时发生。)
- 当出现OS X Utilities屏幕时,请按下屏幕顶部的Utilities菜单,然后选择Terminal
- 运行此命令
csrutil disable; reboot
。这将重启笔记本电脑。
- go to recovery mode (reboot and hold down + keys simultaneously after you hear the startup chime)
- When the "OS X Utilities" screen appears, pull down the ‘Utilities’ menu at the top of the screen instead, and choose "Terminal"
- run this command
csrutil disable;reboot
. This will reboot the laptop.
之后。然后,尝试再次运行该命令,看看会发生什么:D。
After that. Then, try to run the command again and see what will happen :D.
这篇关于在终端中移动usr / bin / java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!