无法安装,当前用户无法写入通道“ pecl.php.net”的php_dir

问题描述 投票:0回答:1

您能帮我解决以下问题吗?

无法安装,当前用户无法写入通道“ 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

谢谢

php laravel mongodb php-extension
1个回答
0
投票

我必须更改本地目录的路径才能解决此问题。这是检查配置的示例

pecl config-show

这里是设置变量路径的示例:

pecl config-set php_dir </usr/local/path>
© www.soinside.com 2019 - 2024. All rights reserved.