关于程序员:ubuntu-安装-指定版本nodejs

4次阅读

共计 283 个字符,预计需要花费 1 分钟才能阅读完成。

通过 PPA 装置指定或最新版本的 nodejs
那么就须要应用 nodesource 来装置指定版本的 nodejs 了。其须要下载一个脚本,运行此脚本会在 ubuntu 里增加一个 nodejs 源,而后用 apt 就能够下载指定的 nodejs 了。

PPA 的全称为 personal package archive。要装置 nodejs 12.x 版本,能够运行如下命令:

cd ~
curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash - 
sudo apt-get update
sudo apt-get install nodejs

本文由 mdnice 多平台公布

正文完
 0