~Onlooker 2012-07-01 18:33 采纳率: 0%
浏览 600
已采纳

将 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条)

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用