macOS下php突然502 的解决方案

由 月林 发布
  | 1151 次浏览

今天调试PHP突然报错502,系统是macOS 10.14.5

终端敲php如下:

KermideMBP:~ kermi$ php dyld: Library not loaded:
/usr/local/opt/icu4c/lib/libicui18n.63.dylib Referenced from:
/usr/local/bin/php Reason: image not found Abort trap: 6

原来是icu4c版本链接的问题,这里报错的是63版本,但我的icu4c已经是64版本

解决方案:

1、更新PHP

brew upgrade php

2、查看/usr/local/Cellar/icu4c目录下有没有你报错提示的版本,有则进入该目录下lib文件夹,复制里面的“版本号.dylib”结尾的文件到/usr/local/opt/icu4c/lib/下

另外,最好定期brew cleanup一下...


版权属于:月琳cc
本文链接:https://kerrinz.com/archives/7.html
作品采用《知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议》进行许可,转载请务必注明出处!

暂无评论

发表评论