原文链接:https://my.oschina.net/kmwzjs/blog/480257
#brew添加源
brew update
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/php
#最好执行一下doctor
brew doctor
#安装扩展
brew install php71-phalcon
安装后重启php
sudo php71-fpm restart
报错
PHP Warning: PHP Startup: phalcon: Unable to initialize module
Module compiled with build ID=API20160303,NTS
PHP compiled with build ID=API20160303,NTS,debug
These options need to match
in Unknown on line 0
Warning: PHP Startup: phalcon: Unable to initialize module
Module compiled with build ID=API20160303,NTS
PHP compiled with build ID=API20160303,NTS,debug
删除扩展
brew remove php71-phalcon
源码安装
brew install php71-phalcon --build-from-source
再重启fpm
phpinfo后能看到扩展了