简体   繁体   English

在终端中移动usr / bin / java

[英]Move usr/bin/java in Terminal

After updating to OS X 10.11, my java stopped working. 更新到OS X 10.11后,我的java停止工作。 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 (aka rootless) that just got introduced with the new OS X. 似乎刚刚引入新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) 进入恢复模式(听到启动响铃后,重启并同时按住Command + R键)
  2. When the “OS X Utilities” screen appears, pull down the 'Utilities' menu at the top of the screen instead, and choose “Terminal” 当出现“OS X Utilities”屏幕时,请按下屏幕顶部的“Utilities”菜单,然后选择“Terminal”
  3. run this command csrutil disable;reboot . 运行此命令csrutil disable;reboot This will reboot the laptop. 这将重启笔记本电脑。

After that. 之后。 Then, try to run the command again and see what will happen :D. 然后,尝试再次运行该命令,看看会发生什么:D。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM