斗士狗 2012-07-01 18:33 采纳率: 0%
浏览 783
已采纳

将 Node.js 升级到 Mac OS 上的最新版本

Currently I am using Node.js v0.6.16 on mac os x 10.7.4. Now I want to upgrade it to the latest Node.js v0.8.1. But after downloading and installing the latest package file from nodejs.org, I found that system is still using v0.6.16 instead of v0.8.1 when I typed "node -v" in a terminal. Is there any step that I have missed? Or should I thoroughly uninstall the old version before installing the latest one?

BTW, I know that nvm can help to manage the nodejs package

https://github.com/creationix/nvm/

Is there any way to upgrade the Node.js without using it?

I have googled this problem, but it seems to me that there is no very clear answer to this question for the latest Node.js. Many thanks.

转载于:https://stackoverflow.com/questions/11284634/upgrade-node-js-to-the-latest-version-on-mac-os

  • 写回答

20条回答 默认 最新

  • 笑故挽风 2013-10-12 11:36
    关注

    Here's how I successfully upgraded from v0.8.18 to v0.10.20 without any other requirements like brew etc, (type these commands in terminal):

    1. sudo npm cache clean -f (force) clear you npm cache
    2. sudo npm install -g n install "n" (this might take a while)
    3. sudo n stable upgrade to lastest version

    Note that sudo might prompt your password.

    If the version number doesn't show up when typing node -v, you might have to reboot.

    these instructions are found here as well: davidwalsh.name/upgrade-nodejs

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(19条)

报告相同问题?

悬赏问题

  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能