在Ubuntu 16.04上更新Node.js [英] updating nodejs on ubuntu 16.04

查看:67
本文介绍了在Ubuntu 16.04上更新Node.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我正在使用ubuntu 16.04中的node版本,当使用node -v命令时它显示的是6.9.1版本,但是当nodejs -v之前它显示6.9.2的版本时,才使用此命令npm update命令是使用.

I was recently going through the version of node in my ubuntu 16.04 when node -v command was used it shows me version 6.9.1 but when nodejs -v it shows 6.9.2 previously before using this commands npm update command was used.

现在node -vnodejs -v有什么区别?以及如何更新到最新的LTS版本的node/nodejs?

Now what's these difference in node -v and nodejs -v? and how to update to the latest LTS version of node/nodejs?

推荐答案

要更新,您可以安装n

To update, you can install n

sudo npm install -g n

然后:

sudo n latest

或特定版本

sudo n 8.9.0

这篇关于在Ubuntu 16.04上更新Node.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆