I've read through all the similar Stack Overflow questions - nothing addresses my specific issue. I'm running OS X 10.11 (El Capitan).
I've cloned the mongo-php-drive repo and these commands succeed:
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 that it is a permissions issue but I don't know how to safely fix it. I don't want to loosen the security of something like /usr/*
.
Any suggestions would be much appreciated.
The problem was due to OS X 10.11 El Capitan's Rootless feature. To be able to install the extension into /usr/lib/php/*
I had to temporarily disable the feature (instructions - please remember to re-enable it afterwards).
press cmd+r when booting up. Then go into utilities > terminal and type the following commands:
csrutil disable
reboot
don't forget to enable it .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With