如何将 nodejs 从 6.x 更新到 8.x? [英] How to update nodejs from 6.x to 8.x?
本文介绍了如何将 nodejs 从 6.x 更新到 8.x?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
简单的问题 - 如何将 nodejs 从 6.x 更新到 8.x?我有 Ubuntu 16.04.我应该卸载旧版本并安装新版本吗?如果是这样,我该怎么做.试过了须藤最新但它说须藤:n:找不到命令当我刚刚最新是需要 sudo哇?
Simple question - How to update nodejs from 6.x to 8.x? I have Ubuntu 16.04. Should I uninstall older version and install new one? If so, how can I do this. A tried sudo n latest but it says sudo: n: command not found and when i just n latest is requires sudo Wtf?
推荐答案
ubuntu 使用此命令
Use this command for ubuntu
sudo npm install npm@latest -g
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
//最新版本
`sudo n latest
这篇关于如何将 nodejs 从 6.x 更新到 8.x?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文