1、首先查看下当前的node版本 node -v 2、然后清除npm当前缓存信息 sudo npm cache clean -f 3、然后执行下载node sudo npm install -g n 4、下载成功后执行安装 sudo n stable 5、最后看下当前版本号 node -v