Ubuntu 安装NodeJS最新版(16.*) and Yarn

2022年2月28日
# 安装更新Node.js和Npm所需要的软件
  1. # 添加NodeSource APT存储库和用于验证软件包的PGP密钥
  2. ### "add NodeSource APT is PGP"
  3. apt install apt-transport-https curl ca-certificates software-properties-common
  4. ### "add apt-get nodejs16.x and PGP" # 该行命令完成了apt-get存储库的添加并添加了PGP密钥
  5. curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
  6. ### "install nodejs and npm...." # 安装Node
  7. apt-get install -y nodejs
  1. ## To install the Yarn package manager, run:
  2. curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
  3. echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  4. sudo apt-get update && sudo apt-get install yarn

没有评论

发表回复

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