can't change permissions on /usr/lib folder [duplicate]
I upgraded to OS X El Capitan and tried to install a new app (MPLAB X from Microchip) but I got an error because it couldn't copy a library to /usr/lib
even when it asked for root password. I tried to manually copying the library using sudo cp libSEGGERAccessLink.dylib /usr/lib
but it says cp: /usr/lib/libSEGGERAccessLink.dylib: Operation not permitted
.
Is this a permission issue? How can I write to /usr/lib
? ls -ld /usr/lib
returns:
drwxr-xr-x 263 root wheel 8942 Oct 2 15:49 /usr/lib
It is a new feature of OS X 10.11 (El Capitan): SIP.
System Integrity Protection (SIP,1 sometimes referred to as rootless2) is a security feature of OS X El Capitan, the operating system by Apple Inc.
...
Among the protected locations are: /System, /bin, /sbin and /usr (but not /usr/local).
System Integrity Protection on Wikipedia
It can be disabled: Stack Exchange thread
In summary, from the Recovery partition, open Terminal.app and run: csrutil disable
...
Update: SIP has been expanded in High Sierra (macOS 10.13)
KB on Apple's Support Site