【问题标题】:homebrew shows a symlink error when installing node安装节点时自制程序显示符号链接错误
【发布时间】:2017-08-17 06:45:45
【问题描述】:

在尝试通过自制软件重新安装节点时,我遇到了这个错误。

$ brew install node
==> Downloading https://homebrew.bintray.com/bottles/node-8.4.0.sierra.bottle.tar.gz
Already downloaded: /Users/Duncan/Library/Caches/Homebrew/node-8.4.0.sierra.bottle.tar.gz

==> Pouring node-8.4.0.sierra.bottle.tar.gz
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
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
????  /usr/local/Cellar/node/8.4.0: 4,152 files, 47.3MB
Duncans-MBP-5:~ Duncan$ brew link node
Linking /usr/local/Cellar/node/8.4.0...
Error: Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.

运行node -v 确认它没有安装。你如何去纠正这个错误?我不知道如何解释Could not symlink

【问题讨论】:

标签: node.js homebrew


【解决方案1】:

最后一行几乎说明了原因:“/usr/local/share/systemtap/tapset 不可写。”

所以你没有权限写入那个目录。

如果你想在没有 root 权限的情况下运行 Homebrew,你应该 chown /usr/local/share/systemtap 到你的 UID,或者你应该为你的 UID 所在的组(通常是 staff,我认为)使其可写。

前者:

sudo chown -R $USER /usr/local/share/systemtap

后者:

sudo chgrp -R staff /usr/local/share/systemtap
sudo chmod -R g+w /usr/local/share/systemtap

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多