dyld:库未加载:在Mac上使用brew安装节点后,运行php的/usr/local/opt/icu4c/lib/libicui18n.62.dylib错误 [英] 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
推荐答案
注意-这将升级您的PHP版本.
Note - This will upgrade your PHP version.
我只是遇到了同样的问题.升级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 upgrade
警告-这将升级您的所有冲煮包装.如果您只想升级特定的软件包,请确保是特定的.
Caution - This will upgrade all your brew packages. 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:库未加载:在Mac上使用brew安装节点后,运行php的/usr/local/opt/icu4c/lib/libicui18n.62.dylib错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!