brew安装节点时,npm无法正确安装

时间:2014-12-17 02:49:45

标签: node.js terminal xterm

我收到以下错误,我认为在尝试执行brew安装节点时出现权限错误。 npm没有正确安装。有什么想法吗?

⚙  /usr/local/bin
 ⚙ /usr/local/bin   master  brew install node
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/node-0.10.33_1
Already downloaded: /Library/Caches/Homebrew/node-0.10.33_1.yosemite.bottle.10.tar.gz
==> Pouring node-0.10.33_1.yosemite.bottle.10.tar.gz
==> Caveats
If you update npm itself, do NOT use the npm update command.
The upstream-recommended way to update npm is:
  npm install -g npm@latest
==> make uninstall
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/Cellar/node/0.10.33_1/libexec/npm/npm-debug.log
make: *** [uninstall] Error 3
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall node`
==> Summary
  /usr/local/Cellar/node/0.10.33_1: 2081 files, 21M
 ✘ /usr/local/bin   master  brew postinstall node
==> make uninstall
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/Cellar/node/0.10.33_1/libexec/npm/npm-debug.log
make: *** [uninstall] Error 3

1 个答案:

答案 0 :(得分:0)

错误上写着:npm ERR! Please try running this command again as root/Administrator.

尝试:$sudo brew install node