I was going to compile a php extension using phpize, but it reported some files not found. I googled and found some solutions,

In OS X 10.9, we can make a symbol link from /XCODE_PATH/OS_X_SDK/usr/include to /usr/include

But it seems that OS X 10.11 has some system policy which deny this operation. I even tried to boot in single user mode, but I just got

$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include /usr/include
Sandbox: ln(14) System policy: deny(1) file-write-create /usr/include

Anyone knows how to fix this problem? Your answers or comments will be highly appreciated.


You can fight SIP, but probably not for long.

Why not just do it the recommended way and put in /usr/local/include

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