关于程序员: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多平台公布

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理