2011-09-10 83 views
4

我想在OSX狮子安装NPM,我运行以下命令:在OSX上安装NPM狮子

curl https://npmjs.org/install.sh | sudo sh 

要求键入“是”后,我做我得到这个:

All clean! 
! [ -d .git ] || git submodule update --init --recursive 
node cli.js rm npm -g -f 
node cli.js cache clean 
Assertion failed: ((req->result == -1 && req->ptr == NULL) || (req->result >= 0 && req->ptr != NULL)), function uv_fs_req_cleanup, file src/unix/fs.c, line 89. 
make: *** [clean] Abort trap: 6 
node(21572,0x7fff73d64960) malloc: *** error for object 0x7ff772051000: pointer being freed was not allocated 
*** set a breakpoint in malloc_error_break to debug 
npm-install-20221.sh: line 211: 21572 Abort trap: 6   "$node" cli.js install -gf 
It failed 

做了一些研究,找不到有这个确切问题的其他人。我的节点版本是v.0.5.7-pre。

编辑

对于那些希望如何安装npmjs URL已更改为仅https(网址上面固定)。

+0

呃,不使用节点的v0.5.x,它不是稳定的。尝试使用v0.4.11,这是最新的稳定版。 – tjameson

+0

我刚刚从github master安装它,我该如何更改版本? – mikelbring

+4

'git checkout v0.4.11; 。/配置;使; sudo make install' – tjameson

回答