I\'m trying to install node with homebrew on macOS Sierra. I run
brew install node
After a seemingly successful install I get the following
Upgrading node fixed a problem.
brew upgrade node
This was triggered for me after a brew upgrade
and brew update
ran. I was able to fix it by simply re-installing the two items flagged as problems (which made sense to me):
brew reinstall node
brew reinstall icu4c
For me it was apparently a problem with the icu4c
installation from brew.
brew reinstall icu4c
will reinstall icu4c
.
if you don't have it installed,
brew install icu4c
I had the same problem with my local php installation.
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Abort trap: 6
Solved the problem with this command. (check your version)
brew link --overwrite --force php@7.1
This is the series of incantations that eventually worked for me based on this link suggested by @robertklep and @vovkasm.
brew uninstall --force node
brew uninstall icu4c && brew install icu4c
brew unlink icu4c && brew link icu4c --force
brew install node
I'm not sure if they're all needed, but given that I can't get my machine in the previous state... I'll just leave this info here, maybe it'll be useful for somebody else.
I recently encountered a similar issue (after doing
brew switch node 9.8.0
to downgrade to a previous version of node)
dyld: Library not loaded:
/usr/local/opt/icu4c/lib/libicui18n.60.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
Abort trap: 6
The issue is that node is picky about which version of icu4c it's looking for, and the version I had installed (62) was higher than node was expecting.
To fix, I made sure I had version 60 of icu4c selected.
First I found which versions I had with brew info icu4c
, then did
brew switch icu4c 60.2
to select the one node was expecting.