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 when trying to run node
:
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
Abort trap: 6
This error was given to me after migrating machines.
Even though everything was installed, when I went to check
node -v
ornpm version
, I'd get this error.What fixed it was
brew reinstall icu4c
.I removed
export PATH="/usr/local/opt/icu4c/bin:$PATH"
from my~/.bash_profile
file and it fixed my problem.My error was:
My
/usr/local/opt/icu4c/lib
containslibicui18n.64.dylib
It's as easy as a common software, just download installation package from official site:NodeJS
and then download a recommended version(currently 8.11.3, end with
.pkg
), install it as a common software, then u can use it. I tried so many methods, and only this works for me.I had the same problem with my local php installation.
Solved the problem with this command. (check your version)
Seems file
/usr/local/opt/icu4c/lib/libicui18n.58.dylib
does not exists in you system.Please ensure that
icu4c
installed with Homebrew.brew info icu4c
brew reinstall icu4c
brew install icu4c
For high seirra, just "brew upgrade" makes magic!