我正在尝试在Os x El Capitan上安装intl扩展。每次我运行sudo pecl install intl
时,我都会在最后一步出现以下错误。我不知道为什么复制操作失败了。这是一个错误还是我错过了什么?
非常感谢任何帮助!
注意:我已正确安装了autoconf
和icu4c
。
Build complete. Don't forget to run 'make test'. running: make INSTALL_ROOT="/private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0" install Installing shared extensions: /private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0/usr/lib/php/extensions/no-debug-non-zts-20121212/ running: find "/private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0" | xargs ls -dils 20728993 0 drwxr-xr-x 3 root wheel 102 Oct 19 19:33 /private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0 20729918 0 drwxr-xr-x 3 root wheel 102 Oct 19 19:33 /private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0/usr 20729919 0 drwxr-xr-x 3 root wheel 102 Oct 19 19:33 /private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0/usr/lib 20729920 0 drwxr-xr-x 3 root wheel 102 Oct 19 19:33 /private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0/usr/lib/php 20729921 0 drwxr-xr-x 3 root wheel 102 Oct 19 19:33 /private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0/usr/lib/php/extensions 20729922 0 drwxr-xr-x 3 root wheel 102 Oct 19 19:33 /private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0/usr/lib/php/extensions/no-debug-non-zts-20121212 20729923 864 -rwxr-xr-x 1 root wheel 440756 Oct 19 19:33 /private/tmp/pear/install/pear-build-rootM6zI6U/install-intl-3.0.0/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so Build process completed successfully Installing '/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so' ERROR: failed to write /usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so (copy(/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so): failed to open stream: Operation not permitted)
答案 0 :(得分:26)
我在尝试安装intl时遇到了同样的问题。
必须像Dan Willis建议的那样禁用系统完整性保护。
重新启动计算机。
当屏幕变黑时按住命令+ r直到您启动恢复。您将看到OS X Utilities菜单。
接下来打开终端。然后输入以下命令。
csrutil disable
请务必记下来以便记住它。
重启你的mac,让它正常启动。
再次打开终端并再次安装INTL
sudo pecl install intl
现在将完成安装。