Ubuntu安装指定版本Node.js

  1. 更新软件包库
sudo apt update
  1. 在 Ubuntu安装 Node.js 14

添加存储库

curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
  1. 安装nodejs
sudo apt -y install nodejs
  1. 验证安装的 Node.js 版本。
node  -v

v14.19.1

你可能感兴趣的:(Linux,ubuntu,node.js,前端)