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
Andres
  • 383

1 Answers1

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

  • 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 02 '15 at 22:32
  • True; some products have been using work-arounds or re-writing necessary components. – willWorkForCookies Oct 02 '15 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 06 '15 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 '15 at 08: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 '15 at 03:38
  • @Andres: i guess that is the only way at the moment, tnx – Rok Jarc Oct 16 '15 at 12:18
  • Thanks helped me out after several hours trying to install PsN 4.4.8 under El Capitan. Just shifted the installation to usr/local/bin. – Pieter Annaert Dec 12 '15 at 15:07
  • In monterey on silicon Macs after disabling SIP, the volume /usr/lib/ is still unwritable. – Hasen Jul 31 '22 at 12:30