1
2
3
4
5
| sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
|
因为用到 add-apt-repository
可能需要安装 software-properties-common
1
| sudo apt-get install software-properties-common
|
来源:Installing Node.js via package manager