Ubuntu Debian Deepin下安装nodejs和npm

Node.js 6

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -`
sudo apt-get install -y nodejs

Alternatively, for Node.js 8

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

Optional: install build tools

To compile and install native addons from npm you may also need to install build tools:
sudo apt-get install -y build-essential

Check nodejs

nodejs -v

Install npm

sudo apt-get install npm

Check npm

npm -v

你可能感兴趣的:(Ubuntu Debian Deepin下安装nodejs和npm)