安装xcode命令行工具
xcode-select --install
安装brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
通过brew安装php5.6(或其它版本)
brew install [email protected]
通过brew安装php切换器
brew install brew-php-switcher
切换php版本
brew-php-switcher 5.6
通过pecl安装PHP的protobuf扩展(要编译,比较慢)
pecl install protobuf
通过pecl安装PHP的grpc扩展(要编译,比较慢)
pecl install grpc