Linode新环境安装NodeJS

先更新系统

sudo apt-get install curl software-properties-common
curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
sudo apt-get install -y nodejs

提示:

Run sudo apt-get install -y nodejs to install Node.js 16.x and npm

You may also need development tools to build native addons:

 sudo apt-get install gcc g++ make

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

https://tecadmin.net/install-latest-nodejs-npm-on-debian/#:~:text=How to Install Node.js on Debian 10%2F9%2F8 1,Server (Optional) This is an optional step.

https://tecadmin.net/install-latest-nodejs-npm-on-debian/#:~:text=How to Install Node.js on Debian 10%2F9%2F8 1,Server (Optional) This is an optional step.

posted on 2021-11-25 22:58  我尽量尽力而为  阅读(52)  评论(0)    收藏  举报

导航