ubuntu 安装 指定版本:nodejs

通过 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 多平台发布

猜你喜欢

转载自blog.csdn.net/qq_37462361/article/details/132561253