So, brew isn't really working for me, it keeps giving me these errors. When I tried to re-install it, it gave me this:
virtu0us:~ lik20$ brew install node
Updating Homebrew...
Warning: node 14.5.0 is already installed, it's just not linked
You can use `brew link node` to link this version.
So when I tried to do that,
virtu0us:~ lik20$ brew install node
Updating Homebrew...
Warning: node 14.5.0 is already installed, it's just not linked
You can use `brew link node` to link this version.
virtu0us:~ lik20$ brew link node
Linking /usr/local/Cellar/node/14.5.0...
Error: Could not symlink include/node/common.gypi
Target /usr/local/include/node/common.gypi
already exists. You may want to remove it:
rm '/usr/local/include/node/common.gypi'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
So I did this:
virtu0us:~ lik20$ brew link node
Linking /usr/local/Cellar/node/14.5.0...
Error: Could not symlink include/node/common.gypi
Target /usr/local/include/node/common.gypi
already exists. You may want to remove it:
rm '/usr/local/include/node/common.gypi'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
virtu0us:~ lik20$ brew link --overwrite node
Linking /usr/local/Cellar/node/14.5.0...
Error: Could not symlink include/node/common.gypi
/usr/local/include/node is not writable.
Is there a way I can fix this?
Related
When following the usual tutorial for node installation I get the following error:
➜ ~ node
zsh: command not found: node
➜ ~ brew install node
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 1 cask.
Warning: node 15.5.1 is already installed, it's just not linked
You can use `brew link node` to link this version.
➜ ~ brew link node
Linking /usr/local/Cellar/node/15.5.1...
Error: Could not symlink include/node/cppgc/allocation.h
Target /usr/local/include/node/cppgc/allocation.h
already exists. You may want to remove it:
rm '/usr/local/include/node/cppgc/allocation.h'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
➜ ~ brew link --overwrite node
Linking /usr/local/Cellar/node/15.5.1...
Error: Could not symlink include/node/cppgc/allocation.h
/usr/local/include/node/cppgc is not writable.
do I need to fix permissions, and am I the only one who is currently running into it?
My case was in MacOs Big Sur 11.2.2
when i run brew install node the error output was like yours.
with the next steps i can run node perfectly:
sudo chmod -R $(whoami):admin /usr/local/inclue/node
sudo chmod -R $(whoami):admin /usr/local/share/doc/node
sudo chmod -R $(whoami):admin /usr/local/share/systemtap/tapset
sudo chmod -R $(whoami):admin /usr/local/lib/dtrace
brew link --overwrite node
hope can help you :)
I am trying to run the command
brew install node
and getting the warning:
node 12.12.0 is already installed, it's just not linked
You can use `brew link node` to link this version.
When running brew link node, I get the error
Error: Could not symlink include/node/common.gypi
Target /usr/local/include/node/common.gypi
already exists. You may want to remove it:
rm '/usr/local/include/node/common.gypi'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
Next, I ran rm '/usr/local/include/node/common.gypi'
and it asks
override rw-r--r-- root/wheel for /usr/local/include/node/common.gypi?
When typing y
it says
rm: /usr/local/include/node/common.gypi: Permission denied
How do I fix the problem with the installation?
Thanks
I assume that you are using Mac.
try
sudo rm: /usr/local/include/node/common.gypi
Also add node PATH to your environment variables.
I have been trying to install node.js on my Mac to use React Native. I tried many different times to install and reinstall node but I'd get a lot of errors.
I have tried installing on a fresh hard drive and I still can't seem to get it to work.
What I would try:
bash-3.2$ brew install node
==> Downloading https://homebrew.bintray.com/bottles/node-12.8.0.mojave.bottle.t
Already downloaded: /Users/malqadi/Library/Caches/Homebrew/downloads/8ea6192c6101b64b58b3ff8bf0cab0b89eb67851ec11f5c95edda2fffcbdbfb0--node-12.8.0.mojave.bottle.tar.gz
==> Pouring node-12.8.0.mojave.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
Target /usr/local/share/systemtap/tapset/node.stp
already exists. You may want to remove it:
rm '/usr/local/share/systemtap/tapset/node.stp'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
Possible conflicting files are:
/usr/local/share/systemtap/tapset/node.stp
/usr/local/lib/dtrace/node.d
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall node`
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
🍺 /usr/local/Cellar/node/12.8.0: 4,629 files, 53.1MB
I do what it recommends, but its the same:
bash-3.2$ brew postinstall node
==> Postinstalling node
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall node`
So I try brew doctor:
bash-3.2$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
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
How would I get this to work?
Try removing the npm module with this command:
rm '/usr/local/share/systemtap/tapset/node.stp'
before linking node with this command:
brew link node
I met an error while doing "brew cleanup":
$ brew cleanup
Warning: Skipping opam: most recent version 2.0.3 not installed
Warning: Skipping python: most recent version 3.7.2_2 not installed
Warning: Skipping sqlite: most recent version 3.27.1 not installed
Error: Permission denied # unlink_internal - /usr/local/lib/node_modules/#angular/cli/node_modules/.bin/in-install
Does anyone know how to fix this?
PS: brew link node returns an error, though I don't know if it is related.
$ brew install node
Warning: node 11.9.0 is already installed, it's just not linked
You can use `brew link node` to link this version.
$ brew link node
Linking /usr/local/Cellar/node/11.9.0...
Error: Could not symlink include/node/common.gypi
Target /usr/local/include/node/common.gypi
already exists. You may want to remove it:
rm '/usr/local/include/node/common.gypi'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node
First fix permissions causing the error:
sudo chown -R "$(whoami)":admin /usr/local
On macOS Mojave, the chown command needs to be run on the specific directory, an example for the permissions issue in /usr/local/lib directory, this command would be
sudo chown -R "$(whoami)":admin /usr/local/lib
Then relink node with the --force option as directed:
brew link --overwrite node
This worked for me:
brew unlink node && brew link node
Installed Homebrew followed by node.js. Ran brew doctor and got the return below. Tried to find an answer but nothing specifically related. Any help would be appreciated. Thanks.
Error: Could not symlink bin/node
Target /usr/local/bin/node
already exists. You may want to remove it:
rm '/usr/local/bin/node'
To force the link and overwrite all conflicting files:
brew link --overwrite node
To list all files that would be deleted:
brew link --overwrite --dry-run node