为什么不能用Homebrew安装Node?

时间:2018-12-18 04:27:35

标签: reactjs terminal homebrew

我能够成功下载自制软件。但是,每当我使用“ brew install node”时,都会收到错误消息:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.
You can try again using:
  brew link node

我也尝试过“ brew link node”,结果是:

Error: Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

解决方案在官方troubleshooting page of Homebrew中。您必须授予Homebrew在/usr/local内部编写的权利。为此,要运行的官方命令是:

cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var opt Cellar Caskroom Frameworks

如果您没有在/usr/local中安装依赖特定权限的应用程序,则还可以运行:

sudo chown -R $(whoami) /usr/local/*