Home Articles

在Os x El Capitan上安装intl扩展时无法写入错误

Asked
Viewed 998 times
11

我正在尝试在Os x El Capitan上安装intl扩展 . 每次我运行 sudo pecl install intl 时,我都知道复制操作失败的原因 . 这是一个错误还是我错过了什么?

任何帮助真的很感激!

Note :我已正确安装了 autoconficu4c .

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)

1 Answer

  • 26

    我在尝试安装intl时遇到了同样的问题 .

    不得不像Dan Willis建议的那样禁用系统完整性保护 .

    • 重新启动计算机 .

    • 当屏幕变黑时按住命令r直到启动恢复 . 您将看到OS X Utilities菜单 .

    • 下一个打开终端 . 然后输入以下命令 .

    csrutil禁用

    请务必记下来,以便记住它 .

    • 重启你的mac,让它正常启动 .

    • 再次打开终端并再次安装INTL

    sudo pecl install intl

    它现在将完成安装 .

Related