24

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

1 Answer 1

29

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

8
  • 5
    Althoiugh in this case I would ask Microchip what to do as if they do support OSX 10.11 they should give a solution - if it is as this answr they don't really support OSX 10.11 and there might be other issues
    – mmmmmm
    Oct 2, 2015 at 22:32
  • True; some products have been using work-arounds or re-writing necessary components. Oct 2, 2015 at 22:40
  • 1
    @Mark Microchip is aware of the issue and we are hoping they will fix it in the next release
    – Andres
    Oct 6, 2015 at 12:52
  • @Andres: it seems you are in the loop :) will you do the same with microchip-libraries-for-applications-v2013-06-15-osx? I know it's a deprecated library but we need it for Android development...
    – Rok Jarc
    Oct 15, 2015 at 8:53
  • 1
    @rokjarc I don't know, didn't use them but I just disabled SIP, installed MPLAB X and enabled it again.
    – Andres
    Oct 16, 2015 at 3:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .