I'm trying to configure xdebug, but when I run the command

cp Downloads/xdebug-2.6.1/xdebug-2.6.1/modules/xdebug.so /usr/lib/php/extensions/no-debug-non-zts-20160303

I get a "Operation not permitted" warning from the terminal, even when I use sudo

I checked the security and privacy settings to make sure the terminal had full disk access and made sure the files in question were unlocked.

What else could be prompting this error?

  • /usr/lib is protected by SIP, user-supplied libraries should be installed in /usr/local/lib.
    – nohillside
    Commented Jan 30, 2019 at 7:16

1 Answer 1


You need to temporarily disable System Integrity Protection


You must log in to answer this question.

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