删除node
yum remove nodejs
删除yum源
cd 到yum源配置文件夹:cd /etc/yum.repo.d
,删除以 node 开头的源;
清除 yum 缓存 yum clean all
安装node
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum install -y nodejs
更新 npm
npm install npm@latest -g
命令:npm -v 输出版本号就成功安装了。
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。