Npm 覆盖或删除节点目标的权限被拒绝

Npm 覆盖或删除节点目标的权限被拒绝,npm,osx-yosemite,Npm,Osx Yosemite,我遇到了一个问题,每次尝试运行npm安装命令时,我都会收到一个错误:'-bash:npm:command not found' 因此,我尝试使用自制软件卸载和重新安装node和npm,但仍遇到一些错误。卸载这两个软件后,我运行命令:“brew医生”并得到“您的系统已准备好进行brew” 首先,我尝试安装节点:“brew安装节点”,但我得到以下信息: ==> Downloading https://homebrew.bintray.com/bottles/node- 0.12.7.yose

我遇到了一个问题,每次尝试运行npm安装命令时,我都会收到一个错误:'-bash:npm:command not found' 因此,我尝试使用自制软件卸载和重新安装node和npm,但仍遇到一些错误。卸载这两个软件后,我运行命令:“brew医生”并得到“您的系统已准备好进行brew”

首先,我尝试安装节点:“brew安装节点”,但我得到以下信息:

==> Downloading https://homebrew.bintray.com/bottles/node-

0.12.7.yosemite.bottle
Already downloaded: /Library/Caches/Homebrew/node-0.12.7.yosemite.bottle.tar.gz
==> Pouring node-0.12.7.yosemite.bottle.tar.gz
==> Caveats

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
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`
==> Summary
Remove the folder

sudo rm -rf /usr/local/share/systemtap/
==>下载https://homebrew.bintray.com/bottles/node-
0.12.7.约塞米蒂
已下载:/Library/Caches/Homebrew/node-0.12.7.yosemite.battle.tar.gz
==>浇注节点-0.12.7.yosemite.瓶子.tar.gz
==>注意事项
Bash completion已安装到:
/usr/local/etc/bash_completion.d
错误:“brew链接”步骤未成功完成
公式已生成,但未符号链接到/usr/local
无法将share/systemtap/tapset/node.stp符号链接
Target/usr/local/share/systemtap/tapset/node.stp
已经存在。您可能要删除它:
rm'/usr/local/share/systemtap/tapset/node.stp'
要强制链接并覆盖所有冲突文件,请执行以下操作:
brew链接--覆盖节点
要列出将被删除的所有文件,请执行以下操作:
brew链接--覆盖--干运行节点
可能存在冲突的文件包括:
/usr/local/share/systemtap/tapset/node.stp
/usr/local/lib/dtrace/node.d
警告:安装后步骤未成功完成
您可以使用“brew后安装节点”重试`
==>摘要
删除文件夹

brew uninstall node
如果需要,请删除以前安装的所有节点

brew install node
然后重新安装节点

我也有同样的问题,为我工作