Move usr/bin/java in Terminal

落爺英雄遲暮 提交于 2019-12-19 05:23:07

问题


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?


回答1:


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 :

  1. go to recovery mode (reboot and hold down Command + R keys simultaneously after you hear the startup chime)
  2. When the “OS X Utilities” screen appears, pull down the ‘Utilities’ menu at the top of the screen instead, and choose “Terminal”
  3. run this command csrutil disable;reboot. This will reboot the laptop.

After that. Then, try to run the command again and see what will happen :D.



来源:https://stackoverflow.com/questions/33007889/move-usr-bin-java-in-terminal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!