`sudo pecl install couchbase` gives an error of `ERROR: failed to mkdir /usr/local/Cellar/php/7.3.8/pecl/20180731`

`sudo pecl install couchbase` gives an error of `ERROR: failed to mkdir /usr/local/Cellar/php/7.3.8/pecl/20180731`

我正在设置 couchbase,但是当我尝试通过 运行 命令 sudo pecl install couchbase 安装 Couchbase PHP 扩展时,它失败并出现错误 ERROR: failed to mkdir /usr/local/Cellar/php/7.3.8/pecl/20180731

我通过使用 brew uninstall php@7.3 卸载 HomeBrew 安装的 PHP-7.3 解决了这个问题,然后使用 brew install php@7.3 重新安装了它。 之后,命令 sudo pecl install couchbase 不再像以前那样带来错误。谢谢@AndreaManzi,我是从你在对这个问题的评论中提供的link得到这个想法的。