Whenever I attempted to run npm --version
or node --version
on my Mac, I was getting the following error:
$> 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
I found this helpful SO post which suggested linking the appropriate version, and fixed my issue with:
$> 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
However after doing this, PHP stopped working:
$> 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
I found this helpful SO post which suggested linking the appropriate version, and fixed my issue with:
$> 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
But now NodeJS is broken again! How can I tell Homebrew to create both links, one for 63.1 and one for 64.2? Or is there a way to tell NodeJS to use the newer 64.2 instead?