我正试图通过运行以下命令在macOS Catalina v10.15.7上安装MongoDB PHP扩展
sudo pecl install mongodb
但它在最后抛出了低于错误的
Build process completed successfully
Installing '/usr/local/Cellar/php@7.4/7.4.13_1/pecl/20190902/mongodb.so'
Warning: mkdir(): File exists in System.php on line 294
Warning: mkdir(): File exists in /usr/local/Cellar/php@7.4/7.4.13_1/share/php@7.4/pear/System.php on line 294
ERROR: failed to mkdir /usr/local/Cellar/php@7.4/7.4.13_1/pecl/20190902
PHP位置为--/usr/local/opt/php@7.4/bin/php
PECL位置为——/usr/local/opt/php@7.4/bin/pecl
提前谢谢。
应用以下解决方案并成功,
pecl config-get ext_dir | pbcopy
mkdir -p {paste clipboard value}
sudo pecl install mongodb