在OSX Lion上安装NPM

时间:2011-09-10 23:53:42

标签: macos node.js npm

我正在尝试在OSX Lion上安装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的人,网址已更改为https(上面已修复网址)。

1 个答案:

答案 0 :(得分:2)

烨。

tjameson是对的。

在安装npm之前安装稳定版本。

直接从节点网站获取源代码:

node-v0.4.11.tar.gz Source Code

相关问题