原因
导致这一问题的原因是苹果公司推出了新的策略SIP: System Integrity Protection SIP
影响
这些目录下使用
sudolscd等命令会出现Operation not permitted
/System
/usr
/bin
/sbin
/var
Apps that are pre-installed with OS X
解决办法
- Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
- After select a language. Then click Utilities > Terminal in the top menu.
- In the Terminal window, type in
csrutil disableand pressEnter. and usecsrutil statusto check the status - Restart your Mac.
- use the same command in some directory then check if it works.