macos - 在 OSX Lion 上安装 NPM

标签 macos node.js npm

我正在尝试在 OSX Lion 上安装 NPM,我运行以下命令:

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

在要求输入“yes”后,我得到了这个:

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

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

编辑

对于那些寻找如何安装 npmjs 的人来说,url 已更改为仅 https(url 固定在上面)。

最佳答案

是的。

tjameson 是对的。

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

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

node-v0.4.11.tar.gz Source Code

关于macos - 在 OSX Lion 上安装 NPM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7375428/

相关文章:

linux - Mac OS X 共享库跨平台开发

ios - OS X ejabberd,XMPPFramework 的新用户注册

C++ 多重继承和 Objective-C。这是 GCC 中的错误吗?

node.js - 在已部署的应用程序上播放来自 s3 的文件时出现跨源资源策略问题

macos - 不能使用带有私用Pem key 的ssh(找不到dlopen镜像)

javascript - 如何处理从nodejs服务器下载图像?

node.js - 为 nodejs/hapi.js 创建蜜 jar

python - 使用 Python 子进程运行 npm 命令

node.js - 本地安装 NodeJS 包

javascript - 是否可以将 Node localhost 暴露给我的主机?