1

I'm very new to Homebrew and Node and am having troubles getting Node up and running.

I successfully installed Homebrew, I then run brew install node and get:

Updating Homebrew...
Warning: node 13.2.0 is already installed, it's just not linked
You can use `brew link node` to link this version.

I run brew link node and get:

Linking /usr/local/Cellar/node/13.2.0... 
Error: Could not symlink include/node/common.gypi
/usr/local/include/node is not writable.

Does anyone know how to fix this? Guessing it has something to do with my file not being "writable" but not sure. Thank you so much!

jeff
  • 21
  • 1

2 Answers2

0

It seems you have a permission problem. The directories that homebrew tries to install node into have to be writable. Try this; it sets your user as owner of these subdirectories:

chown -R `whoami`:admin /usr/local/bin
chown -R `whoami`:admin /usr/local/share
chown -R `whoami`:admin /usr/local/include

and then try installing node again. You might have to brew uninstall node before brew install node.

ingenuity
  • 22
  • 4
0

Grab from the previous post:

$ sudo chown -R $(whoami) $(brew --prefix)/* is the solution.

chenrui
  • 8,910
  • 3
  • 33
  • 43