Error configuring mcrypt after upgrading to El Capitan I am facing the following issue after upgrading to El Capitan. It says:

Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20121212/
cp: /usr/lib/php/extensions/no-debug-non-zts-20121212/#INST@826#: Operation not permitted


while running sudo make install in mcrypt/php-5.6.13/ext/mcrypt folder.
I think this is due to SIP but what is the other way round.

What is SIP and how do I know if it's causing this error?
After reading @user980575's response (which is a bit redundant with directories) and a comment on Coolest Guide's On The Planet's post regarding this subject (which requires manually editing your ./configure script) I came up with an alternative solution. Overriding the EXTENSION_DIR on the fly. 

It took a little trial and error but when you're ready to actually perform the install after phpizing (is that a word?) simply make the directory:

mkdir -p /usr/local/lib/php/extensions


And then run:

./configure

make

sudo make EXTENSION_DIR='/usr/local/lib/php/extensions' install


Now that the extension is placed in a non-protected directory you just have to update your php.ini to point to the extension with the full path.

extension=/usr/local/lib/php/extensions/mcrypt.so