# 安装更新Node.js和Npm所需要的软件
- # 添加NodeSource APT存储库和用于验证软件包的PGP密钥
- ### "add NodeSource APT is PGP"
- apt install apt-transport-https curl ca-certificates software-properties-common
- ### "add apt-get nodejs16.x and PGP" # 该行命令完成了apt-get存储库的添加并添加了PGP密钥
- curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
- ### "install nodejs and npm...." # 安装Node
- apt-get install -y nodejs
- ## To install the Yarn package manager, run:
- curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
- 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
- sudo apt-get update && sudo apt-get install yarn
没有评论