2017-08-17 42 views
0

在尝试通过自制软件重新安装节点时遇到此错误。安装节点时,自制软件显示符号链接错误

$ 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

+1

不是一个答案,但我建议你使用'nvm'安装节点。 – Malice

+0

https://github.com/creationix/nvm – Malice

+0

'brew doctor'输出是什么? –

回答

1

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

因此,您无权在该目录中写入。

如果你想没有root权限运行自制软件,您应该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