Ubuntu/debian系安装nodejs环境

安装8.x版本

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

安装10.x版本

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

替换相应的版本号即可,8.x/9.x/10.x
npm也被安装了

你可能感兴趣的:(Ubuntu/debian系安装nodejs环境)