克服错误如下
执行下面的命令
$ brew doctor ‹ruby-2.7.6›
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
php@7.0
php@7.1
php@7.2
php@7.3
php@7.4
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/node/cppgc/common.h
/usr/local/include/node/js_native_api.h
/usr/local/include/node/js_native_api_types.h
/usr/local/include/node/libplatform/libplatform-export.h
/usr/local/include/node/libplatform/libplatform.h
. . . .
然后执行下面的命令
然后做brew cleanup
重新安装
并安装以下PHP版本
执行下面的命令
然后检查
完成
sumber:https://medium.com/macoclock/how-to-install-multiple-php-versions-on-macos-1f290c32cd63