【发布时间】:2020-03-08 14:53:06
【问题描述】:
您能帮我解决以下问题吗?
无法安装,当前用户无法写入频道“pecl.php.net”的 php_dir
我想为php安装mongodb扩展
macOS Calelina
Version 10.15.3
gajanan@MyMac / % csrutil status
System Integrity Protection status: disabled.
我已经以管理员身份登录
gajanan@MyMac / % php -v
PHP 7.3.11 (cli) (built: Dec 13 2019 19:21:21) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
gajanan@MyMac / % pecl version
PEAR Version: 1.10.10
PHP Version: 7.3.11
Zend Engine Version: 3.3.11
Running on: Darwin MyMac.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64
gajanan@MyMac / % sudo pecl install mongodb
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
Cannot install, php_dir for channel "pecl.php.net" is not writeable by the current user
gajanan@MyMac / % sudo pecl channel-update pecl.php.net
Updating channel "pecl.php.net"
Registry directory is not writeable by the current user
谢谢
【问题讨论】:
-
这个问题你解决了吗?
-
我不得不更改本地目录的路径来解决这个问题: 这是检查配置的示例
pecl config-show这是设置变量路径的示例:pecl config-set php_dir </usr/local/path> -
谢谢。但这对我没有帮助:/
标签: php laravel mongodb php-extension