当我在 mac m1 Sonoma 上执行
node -v
时:
dyld[26417]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib
Referenced from: <E52D9D5D-9957-386D-9594-32159BF15B1A> /opt/homebrew/Cellar/node@14/14.21.3_1/libexec/node
Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/usr/local/lib/libicui18n.73.dylib' (no such file), '/usr/lib/libicui18n.73.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/usr/local/lib/libicui18n.73.dylib' (no such file), '/usr/lib/libicui18n.73.dylib' (no such file, not in dyld cache)
[1] 26417 abort node -v
重新安装节点或重新安装icu4c不起作用
将 PHP 8.2 升级到最新版本为我解决了这个问题。