由Homebrew安装的两个版本的icu4c
每当我尝试在Mac上运行时,我都会收到以下错误:npm --version
node --version
$> node --version
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
Abort trap: 6
我发现这个有用的SO帖子建议链接适当的版本,并修复了我的问题:
$> brew switch icu4c 63.1
Cleaning /usr/local/Cellar/icu4c/64.2
Cleaning /usr/local/Cellar/icu4c/63.1
Opt link created for /usr/local/Cellar/icu4c/63.1
但是,在执行此操作后,PHP停止工作:
$> tail /usr/local/var/log/php-fpm.log
Reason: image not found
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
Referenced from: /usr/local/opt/php/sbin/php-fpm
Reason: image not found
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
Referenced from: /usr/local/opt/php/sbin/php-fpm
Reason: image not found
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
Referenced from: /usr/local/opt/php/sbin/php-fpm
Reason: image not found
我发现这个有用的SO帖子建议链接适当的版本,并修复了我的问题:
$> brew switch icu4c 64.2
Cleaning /usr/local/Cellar/icu4c/64.2
Cleaning /usr/local/Cellar/icu4c/63.1
Opt link created for /usr/local/Cellar/icu4c/64.2
但是现在NodeJS又坏了!如何告诉 Homebrew 创建两个链接,一个用于 63.1,一个用于 64.2?或者有没有办法告诉NodeJS使用更新的64.2?