手欠升級了一下Mac系統,發現php php-fpm都啟動不了並報錯
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Trace/BPT trap: 5
尋找各種辦法都解決不了,不得已重裝php
解決參考:http://www.phpersay.com/index.php?c=index&m=articleDetailInfo&id=112
(按上操作后,7.0版本可正常啟動,但7.1和7.2依然報錯,每個版本逐個解決太麻煩 so 不得已卸載重裝PHP)
查看brew安裝過的服務列表
➜ brew services list
#查看是否有php@7.0,如果有
➜ brew uninstall php@7.0
Uninstalling /usr/local/Cellar/php@7.0/7.1.12_23... (506 files, 47.9MB)
#刪除對應的配置文件
➜ rm -rf /usr/local/etc/php/7.0
➜ brew doctor
重新安裝:
brew install php@7.0
接下來課繼續安裝 php@7.1和php@7.2,我是多版本切換所以都裝
安裝參考:http://www.phpersay.com/index.php?c=index&m=articleDetailInfo&id=112
解決參考:http://www.phpersay.com/index.php?c=index&m=articleDetailInfo&id=112