Installing node with brew fails on Mac OS Sierra

2020-05-12 04:50发布

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

20条回答
beautiful°
2楼-- · 2020-05-12 05:17

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
查看更多
神经病院院长
3楼-- · 2020-05-12 05:21

None of the above worked for me. I'm using High Sierra.

What fixed it for me was brew upgrade

查看更多
趁早两清
4楼-- · 2020-05-12 05:22

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
查看更多
We Are One
5楼-- · 2020-05-12 05:24

In my case, brew upgrade node resolve the problem :)

查看更多
别忘想泡老子
6楼-- · 2020-05-12 05:24

First I uninstall node and icu4c, force to uninstall all versions

brew uninstall --force --ignore-dependencies node icu4c

After install version 8 of Node

brew install node@8

If it already install, please just upgrade

brew upgrade node@8

And enter

node -v

v8.11.1

查看更多
爷的心禁止访问
7楼-- · 2020-05-12 05:26

it seems like your icu4u Reference path is not set properly

first check you might instal icu4c or not by putting below comment in comment promt

brew info icu4c

or else reinstall

brew reinstall icu4c

If you need to have this software first in your PATH run:

echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile

hope This might help !!!!!

查看更多
登录 后发表回答