yum安装指定版本nodejs

curl -sL https://rpm.nodesource.com/setup_14.x | bash -

yum remove nodesource-release* nodejs
yum clean all
rm -rf /var/cache/yum/*
rm /etc/yum.repos.d/nodesource-el.repo

yum install nodejs

说明:

访问 https://github.com/nodesource/distributions/blob/master/README.md 链接,根据自己的系统类型,来执行符合自己版本的命令。

posted @ 2023-01-09 22:55  郭小睿  阅读(1415)  评论(0编辑  收藏  举报