【问题标题】:Installing NPM on OSX Lion在 OSX Lion 上安装 NPM
【发布时间】:2011-11-14 13:58:11
【问题描述】:

我正在尝试在 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 的人,url 已更改为仅https(上面固定的 url)。

【问题讨论】:

  • 呃,不要用node的v0.5.x,不稳定。尝试使用 v0.4.11,它是最新的稳定版。
  • 我刚从github master上安装的,怎么改版本?
  • git checkout v0.4.11; ./configure; make; sudo make install

标签: macos node.js npm


【解决方案1】:

是的。

tjameson 是对的。

在安装 npm 之前安装 stable 版本。

直接从node网站获取源代码:

node-v0.4.11.tar.gz Source Code

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-03-26
    • 1970-01-01
    • 1970-01-01
    • 2012-12-26
    • 2012-03-03
    • 2012-08-08
    • 1970-01-01
    相关资源
    最近更新 更多