偶然機會,手賤點擊了系統升級到:macOS Sierra 10.12.5 (16F73)php
而後發現系統的php升級到了7.0,可是Configure項裏邊卻使用的是PHP5的路徑mysql
--prefix=/usr/local/php5,而且莫名其妙沒法使用加密相關的mcrypt等庫,重啓FPM會拋一堆的錯誤,提示擴展庫沒法加載。redis
狠心的將系統的全部php5關聯信息清理掉:sql
brew unlink php55php7
brew unlink php56curl
sudo rm -rf /user/local/php5socket
sudo rm -rf /user/local/php5.5加密
sudo rm -rf /user/local/php5.6url
.....清理其餘冗餘的版本。spa
而後從新查詢系統的php70狀態
brew search php70 查看php7.0關聯的全部插件是否已經安裝(以下效果)
一、若沒有關聯庫的,須要先配置第三方庫:brew tap homebrew/homebrew-php;
二、已經有列表的:brew install或upgrade php70;
在重裝或者升級時,能夠指定配置選項,例如我本地環境:
brew upgrade php70 --with-curl --with-iconv --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --enable-fpm --enable-mysqlnd --with-mcrypt --enable-zip --with-pear --enable-soap --enable-mbstring --enable-sockets --with-gd --with-zlib --with-libxml-dir --enable-xml --enable-gd-native-ttf --with-xmlrpc --with-mhash --with-jpeg-dir=/usr/local/php70 --with-png-dir=/usr/local/php70 --with-openssl --enable-exif --with-xsl --enable-calendar --enable-pcntl --enable-dtrace --enable-opcache --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --prefix=/usr/local/php70
三、而後發現常規使用的例如memcache\redis\opcache\mcrypt\intl 有缺失的:
brew install php70-redis|intl
搞定!!