dyld:库未加载:/usr/local/opt/icu4c/lib/libicui18n.62.dylib 在 Mac 上使用 brew 安装节点后运行 php 时出错 [英] dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error running php after installing node with brew on Mac
问题描述
我使用自制软件(Mojave)安装了节点,之后 php 停止工作,如果我尝试运行 php -v
我收到此错误:
I installed node using homebrew (Mojave), afterwards php stoped working and if I try to run php -v
I get this error:
php -v
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
我尝试卸载 node 和 icu4c 但问题仍然存在
I tried to uninstall both node and icu4c but the problem persists
推荐答案
更新 - 正如一些评论中所述,运行
brew cleanup
可能会修复此错误,如果仅此一项不能修复它,您可以尝试升级单个包或所有 brew 包.
Update - As stated in some of the comments, running
brew cleanup
could possibly fix this error, if that alone doesn't fix it, you might try upgrading individual packages or all your brew packages.
我刚刚遇到了同样的问题.升级 Homebrew 然后清理对我有用.由于软件包版本不匹配,我可能会出现此错误.上述解决方案都没有解决我的错误,但运行以下自制命令可以解决.
I just had this same problem. Upgrading Homebrew and then cleaning up worked for me. This error likely showed up for me because of a mismatch in package versions. None of the above solutions resolved my error, but running the following homebrew commands did.
注意 - 这将升级您的所有 brew 包,包括但不限于 PHP.如果您只想升级特定的软件包,请确保是特定的.
Caution - This will upgrade all your brew packages, including, but not limited to PHP. If you only want to upgrade specific packages make sure to be specific.
brew upgrade // for upgrading all packages -- this is the command I used
brew upgrade {package} // for upgrading a specific package
最后
brew cleanup
这篇关于dyld:库未加载:/usr/local/opt/icu4c/lib/libicui18n.62.dylib 在 Mac 上使用 brew 安装节点后运行 php 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!