Cannot install mongo-php driver on OS X 10.11

I read all the similar questions about stack overflows - nothing affects my specific problem. I am running OS X 10.11 (El Capitan).

I cloned a mongo-php-drive repo and these commands succeeded:

phpize ./configure make 

But sudo make install fails:

 (master) ~/tmp/mongo-php-driver $ sudo make install Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20121212/ cp: /usr/lib/php/extensions/no-debug-non-zts-20121212/# INST@39898 #: Operation not permitted make: *** [install-modules] Error 1 

I understand this is a permissions issue, but I don’t know how to fix it safely. I do not want to weaken the security of something like /usr/* .

Any suggestions would be highly appreciated.

+6
source share
2 answers

The problem arose due to OS X 10.11 El Capitan Rootless Function . To install the extension in /usr/lib/php/* , I had to temporarily disable this function ( instructions - do not forget to enable it again later).

+15
source

press cmd + r at boot. Then go to utility> terminal and enter the following commands:

 csrutil disable reboot 

don't forget to turn it on.

+3
source

All Articles