Trouble install node.js with homebrew

Or, alternatively, verify the ownership and permissions on systemtap

$ ls -al /usr/local/share/systemtap/
drwxr-xr-x   3 root  wheel  102 Oct 23 18:06 .
drwxrwxr-x  15 root  wheel  510 Oct 24 20:24 ..
drwxr-xr-x   2 root  wheel   68 Oct 24 20:17 tapset

then add yourself to the owner group (in this case wheel)

sudo dscl . append /Groups/wheel GroupMembership <username>

then change the permissions on tapset to allow group edits

sudo chmod -R 775 /usr/local/share/systemtap/tapset/

What worked for me:

  1. cd /usr/local/share
  2. sudo chown -R <user>:<group> systemtap (Did 1 & 2 for /usr/local too)

Above steps were failing. Went to next answer. Tried;

ls -al /usr/local/share/systemtap/ which throwed a 'Not found error.'

Then: brew link node was throwing an error. So I did:

  1. sudo rm -rf /usr/local/lib/node_modules
  2. brew postinstall node -v
  3. And at last brew link node
  4. node -v :)

So basically I removed all node_modules/ folders and redid everything.


It may be that you don't actually own your systemtap directory. Navigate to /usr/local/share and run this command in order to make yourself the owner:

chown -R <yourusername>:<yourgroupname> systemtap

When I was fixing this same issue earlier today, I had to also go into /usr/local and do the same thing for the lib directory.