麻烦用自制软件安装node.js [英] Trouble install node.js with homebrew
问题描述
我正在尝试使用Homebrew安装Node.js(我以前没有使用brew来安装它,并且试图删除所有这些文件).我看过以前的问题,问过类似的问题,但我无法使它们起作用.首先,我尝试了brew link node
这给了我
I'm trying to install Node.js with Homebrew (I installed it previously without using brew, and I've tried deleting all of those files). I've looked at previous questions asking similar things, but I haven't been able to get them to work. First I tried brew link node
which gave me:
myusername@c126h060:~$ brew link node
Linking /usr/local/Cellar/node/0.12.6...
Error: 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
然后当我运行brew link --overwrite node
时,我得到以下信息:
And then when I run brew link --overwrite node
I get the following:
myusername@c126h060:~$ brew link --overwrite node
Linking /usr/local/Cellar/node/0.12.6...
Error: Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.
此外,当我尝试使用brew link -n node
查找要手动删除的文件时,我设法删除了其中的一些文件,但仍然留下了以下无法删除的文件:
Additionally, when I tried using brew link -n node
to find files to manually delete, I managed to delete some of them, but I'm still left with the following files that I can't delete:
myusername@c126h060:~$ brew link -n node
Would link:
/usr/local/etc/bash_completion.d/npm
/usr/local/bin/node
/usr/local/include/node
/usr/local/share/man/man1/node.1
/usr/local/share/systemtap/tapset/node.stp
/usr/local/lib/dtrace/node.d
当我尝试删除时,我得到以下信息(所有这些文件都相同):
When I try to delete I get the following (same thing for all of these files):
myusername@c126h060:~$ rm /usr/local/etc/bash_completion.d/npm
rm: /usr/local/etc/bash_completion.d/npm: No such file or directory
我该怎么办?
推荐答案
可能不是您实际拥有的systemtap目录.导航到/usr/local/share
并运行以下命令以使自己成为所有者:
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
今天早些时候修复同一问题时,我还必须进入/usr/local
,并对lib目录执行相同的操作.
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.
这篇关于麻烦用自制软件安装node.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!