If you try installing the latest version of node using the apt-package manager, you'll end up with v10.19.0. This is the latest version in the ubuntu app store, but it's not the latest released version of NodeJS.
如果尝试使用apt-package Manager安装最新版本的node,最终将得到v10.19.0 。 这是ubuntu应用商店中的最新版本,但不是NodeJS的最新发布版本。
This is because when new versions of a software are released, it can take months for the Ubuntu team to test and release in the official Ubuntu store. As a result, to get the latest versions of any software, we may have to use private packages published by developers.
这是因为发布新版本的软件时,Ubuntu团队可能要花费数月才能在Ubuntu官方商店进行测试和发布。 因此,要获取任何软件的最新版本,我们可能必须使用开发人员发布的私有软件包。
In this tutorial, what we want to do is get either v12.18.1 (LTS - with Long term support) or v14.4 of Node. To get the latest versions, we can use either nodesource or nvm (node version manager). I'll show you how to use both.
在本教程中,我们要做的是获取v12.18.1 (具有长期支持的LTS)或v14.4的Node。 要获取最新版本,我们可以使用nodesource或nvm (节点版本管理器)。 我将向您展示如何同时使用两者。
All commands here will be run using the Ubuntu CLI/terminal.
此处的所有命令都将使用Ubuntu CLI /终端运行。