我目前在Mac OS上无法安装NPM,我已经到处寻找有相同错误的人,但似乎找不到任何解决方案。有人可以帮我吗?这是我在运行curl命令安装NPM后得到的结果:
All clean!
npm-install-94139.sh: line 302: 94407 Segmentation fault: 11 "$node" cli.js rm npm -gf
npm ERR! addLocal Could not install .
npm ERR! Error: EACCES, open '/Volumes/MacintoshHD/Users/Sebastian/.npm/3a52ce78-.lock'
npm ERR! { [Error: EACCES, open '/Volumes/MacintoshHD/Users/Sebastian/.npm/3a52ce78-.lock']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Volumes/MacintoshHD/Users/Sebastian/.npm/3a52ce78-.lock' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 12.5.0
npm ERR! command "/usr/local/bin/node" "/private/var/folders/52/msjnslgn4qnfjgxfvg28f8kc0000gn/T/npm.94143/package/cli.js" "install" "-gf"
npm ERR! cwd /private/var/folders/52/msjnslgn4qnfjgxfvg28f8kc0000gn/T/npm.94143/package
npm ERR! node -v v0.8.19
npm ERR! npm -v 1.1.71
npm ERR! path /Volumes/MacintoshHD/Users/Sebastian/.npm/3a52ce78-.lock
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Volumes/MacintoshHD/Users/Sebastian/.npm/3a52ce78-.lock'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/var/folders/52/msjnslgn4qnfjgxfvg28f8kc0000gn/T/npm.94143/package/npm-debug.log
npm ERR! not ok code 0
It failed
curl
来安装 NPM。这是在 Node 0.4 中安装的方式,但自从 0.6.3 以来,它已经与 Node 捆绑在一起了。而且,看起来你已经安装了它 --npm ERR! npm -v 1.1.71
。尝试使用npm -v
和npm -h
。 - Jonathan Lonowskibrew install node
之后出现的,因此它应该是最新版本。 - schlownpm -v
显示1.2.10,但是输出Segmentation fault: 11
,你知道这是什么问题吗? - schlow