- cd /opt/homebrew/Cellar/php@7.4/7.4.30
- pecl install mongodb
- 出现报错 fatal error: pcre2.h file not found,执行
ln -s /opt/homebrew/include/pcre2.h /opt/homebrew/Cellar/php@7.4/7.4.30/include/php/ext/pcre/pcre2.h - 安装成功,执行
php -m|grep mongodb查看即可。
记录学习和工作
ln -s /opt/homebrew/include/pcre2.h /opt/homebrew/Cellar/php@7.4/7.4.30/include/php/ext/pcre/pcre2.hphp -m|grep mongodb 查看即可。
评论 (0)