终端中输入
brew search php
brew install [email protected]
brew link [email protected]
brew link 出现warning执行(使用zsh的可将bash_profile改为zshrc)
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.bash_profile