1

In trying to reinstall node through homebrew I'm encountering this error.

$ 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.

Running node -v confirms that it's not installed. How do you go about correcting for this error? I'm not sure how to interpret Could not symlink

hackerman
  • 1,221
  • 3
  • 17
  • 38

1 Answers1

3

The last line pretty much states the reason: "/usr/local/share/systemtap/tapset is not writable."

So you don't have permission to write in that directory.

If you want to run Homebrew without root privileges, you should either chown /usr/local/share/systemtap to your UID, or you should make it writable for a group that your UID is in (usually staff, I think).

The former:

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

The latter:

sudo chgrp -R staff /usr/local/share/systemtap
sudo chmod -R g+w /usr/local/share/systemtap
robertklep
  • 198,204
  • 35
  • 394
  • 381