Homebrew 安装 NodeJS 后无法正常使用的解决方案

运行环境
  • OS X El Capitan 10.11.6
  • Homebrew 0.9.9 (git revision 2c35d; last commit 2016-08-31)
  • Node v6.5.0
安装
$ brew install node
$ brew link node
错误提示

Linking /usr/local/Cellar/node/6.5.0...
Error: Could not symlink share/systemtap/tapset/node.stp
Target /usr/local/share/systemtap/tapset/node.stp
already exists. You may want to remove it:
rm '/usr/local/share/systemtap/tapset/node.stp'

To force the link and overwrite all conflicting files:
brew link --overwrite node

To list all files that would be deleted:
brew link --overwrite --dry-run node

解决方案
$ chown -R :admin /usr/local/share/systemtap
$ sudo rm -rf /usr/local/share/systemtap/tapset/node.stp
$ brew link node

然后就可以用啦~

你可能感兴趣的:(Homebrew 安装 NodeJS 后无法正常使用的解决方案)