osx homebrew permission issues

1

I am having a lot of permission issue on my OSX 10.13.4 machine. Homebrew seems to be unable to correctly finish the package installation correctly.

Here is the following exemple for npm but I have the same issue with node. both seem to be installed but not linked to my environment if I understand well. I have tried all I could find but I am running dry of ideas. I also tried uninstalling/reinstalling Homebrew

brew install npm I get a symlink error:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/node/android-ifaddrs.h
/usr/local/include/node is not writable.
npm -v gives env: node: No such file or directory

brew link node and brew postinstall node give the same error

brew doctor gives me another bunch of warnings:

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
node

Warning: Broken symlinks were found. Remove them with `brew prune`:

brew prune gives Error: Permission denied @ unlink_internal - /usr/local/lib/node_modules/npm/node_modules/.bin/JSONStream

jotyhista

Posted 2018-04-19T21:09:39.727

Reputation: 43

you have to reinstall the brew! try /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

– Rizwan Atta – 2018-04-20T12:01:22.727

or try update brew – Rizwan Atta – 2018-04-20T12:01:42.590

@Rizwanatta I tried uninstalling / reinstalling Homebrew but that did not fix the issue – jotyhista – 2018-04-20T22:04:44.453

No answers