我正在尝试按照本教程https://codingexplained.com/dev-ops/mac/installing-php-intl-extension-os-x-mavericks在Mac上安装PHP扩展 intl 。
但是,当我启动命令sudo php install-pear-nozlib.phar
时。我在终端中收到以下错误:
[PEAR] Archive_Tar: failed to mkdir /usr/lib/php/pear/Archive
[PEAR] Console_Getopt: failed to mkdir /usr/lib/php/pear/Console
warning: pear/PEAR requires package "pear/Archive_Tar" (version >= 1.3.7)
warning: pear/PEAR requires package "pear/Structures_Graph" (recommended version 1.0.4)
warning: pear/PEAR requires package "pear/Console_Getopt" (recommended version 1.2.3)
warning: pear/PEAR requires package "pear/XML_Util" (recommended version 1.2.1)
[PEAR] PEAR: failed to mkdir /usr/lib/php/pear/OS
[PEAR] Structures_Graph: failed to mkdir /usr/lib/php/pear/docs/Structures_Graph/docs/html/media
[PEAR] XML_Util: failed to mkdir /usr/lib/php/pear/docs/XML_Util/examples
我不明白为什么考虑到我正在使用sudo
命令而无法创建目录。
我认为它可能与root用户有关,因此我按照这些说明https://coolestguidesontheplanet.com/enable-root-user-macos-sierra/启用了它,但这并没有改变任何内容。
以前有人遇到过这个问题吗?
提前致谢。