why
The problem was caused by Apple’s new policy SIP: System Integrity Protection SIP
impact
Operation not permitted when you run commands such as sudo ls CD in these directories
/System
/usr
/bin
/sbin
/var
Apps that are pre-installed with OS X
Copy the code
The solution
- 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 disable
and pressEnter
. and usecsrutil status
to check the status - Restart your Mac.
- use the same command in some directory then check if it works.