斗士狗 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 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)