在 ubuntu 16.04 上更新 nodejs [英] updating nodejs on ubuntu 16.04

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

问题描述

我最近在我的 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 有什么区别?以及如何更新到 node/nodejs 的最新 LTS 版本?

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

推荐答案

要更新,可以安装n个

sudo npm install -g n

然后就是:

sudo n latest

或特定版本

sudo n 8.9.0

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

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