我使用brew 软件(Mojave)安装了node,之后php停止工作,如果我try 运行php -v
,就会出现以下错误:
php -v
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
我try 卸载node和icu4c,但问题仍然存在
我使用brew 软件(Mojave)安装了node,之后php停止工作,如果我try 运行php -v
,就会出现以下错误:
php -v
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
我try 卸载node和icu4c,但问题仍然存在
更新-如一些 comments 中所述,运行
brew cleanup
可能会修复此错误,如果仅此一项无法修复此错误,您可以try 升级单个软件包或所有brew软件包.
我也有同样的问题.升级brew 软件,然后进行清理对我来说很有效.这个错误可能出现在我身上,因为包版本不匹配.上述解决方案都没有解决我的错误,但运行以下brew 命令就解决了.
Caution-这将升级所有BREW软件包,包括但不限于PHP.如果您只想升级特定的软件包,请确保是特定的.
brew upgrade // for upgrading all packages -- this is the command I used
brew upgrade {package} // for upgrading a specific package
最后,
brew cleanup