Want to see the detailed interpretation of can point here only need to solve the problem just look down.
---------------------------------------------------Split Line-------------------------------------------------------
Mac OS Sierra installs PHP extensions, and at the time of make install, a similar
CP:/usr/lib/php/extensions/no-debug-non-zts-20131226/#[email protected]12567#: Operation not permittedmake: * * [install1
The error is because the OS X 10.11 El Capitan started, adding a new security mechanism called system Integrity Protection systems Integrity Protection (SIP), so for the directory
/system
/sbin
/usr
Not included (/usr/local/)
For system use only, other users or programs cannot be used directly, and our/usr/lib/php/extensions/is just within the protected range.
The solution is
To disable the SIP protection mechanism:
- Rebooting the system
- Press and hold COMMAND + R (after re-lighting the screen, start pressing, symbolically press for a few seconds and then release, the Apple logo appears, OK)
- Menu "Utility" ==>> "terminal" ==>> input csrutil disable; output after execution: successfully disabled System Integrity Protection . Please restart the machine for the changes and take effect.
- Rebooting the system
After the SIP is forbidden, it can be installed smoothly, of course, after it is finished, remember to reopen the SIP, the same way, but the command is csrutil enable.
Additional Mac OS to install the Redis extension process for PHP:
Curl-o https://Nodeload.github.com/nicolasff/phpredis/zip/masterTar-zxf Master CD Phpredis-master/phpize./Configure Make sudo Make Install# Tips/usr/lib/php/extensions/no-debug-non-zts-xxxxxxxxx/indicates success vim/etc/php.ini (if not, copy the/etc/Php.ini.default and rename) # Add the following sentence to tell PHP to enable the Redis extension, save the file extension=redis.so #重启apachesudoapachectl Restart #查看扩展安装情况, Redis appears to indicate a successful installation. or see Phpinfo () PHP-M |grepRedis
In addition: I have had a rather lame question:
Php-m |grep Redis View does have a redis extension installed, but Phpinfo does not, of course, the startup project is also not supported Redis (tp3.2), the above process has been checked several times for a long time, and then
Php-i found that the PHP installation path that is viewed in the terminal is different from the php.ini path I modified, so it is not that I have installed the extended PHP, but another PHP installed in my system.
Say this question also blame oneself, the system comes with a PHP, with homebrew installed two version of PHP, through the command line directly has installed a PHP, not chaos only strange, later removed the homebrew installed PHP, using the system comes with,
Do the above again and solve the problem.
A switch PHP version is recommended: MacOS Sierra installs Apache and multiple versions of PHP switching are fully spoken.
Mac OS Sierra Install PHP extension operation not permitted