先介绍下需要安装的文件
Node版本管理工具n
,可直接安装。
1: 查看node版本
node --version
2: 清除node缓存
sudo npm cache clean -f
3: 全局安装node版本管理工具n
sudo npm install n -g
4: 使用版本管理工具安装指定node版本或者升级到最新node版本
sudo n stable (安装node稳定版本)
sudo n latest (安装node最新版本)
sudo n