我正在尝试使用Homebrew安装Node.js(我以前没有使用brew来安装它,并且尝试删除所有这些文件)。我看过以前的问题,问过类似的问题,但我一直无法使它们起作用。首先,我尝试brew link node了一下:
brew link node
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我得到以下信息:
brew link --overwrite node
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查找文件来手动删除时,我设法删除了其中的一些文件,但仍然留下了以下无法删除的文件:
brew link -n node
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
当我尝试删除时,得到以下信息(所有这些文件都相同):
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并运行此命令以使自己成为所有者:
/usr/local/share
chown -R <yourusername>:<yourgroupname> systemtap
今天早些时候修复同一问题时,我还必须进入/usr/locallib目录并执行相同的操作。
/usr/local