1. 更新ubuntu软件源
Ubuntu 16.04 TLS,执行以下命令:
sudo apt-get update
sudo apt-get install -y python-software-properties software-properties-common
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
Ubuntu 18.04 TLS,执行以下命令:
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:chris-lea/node.js