yum安装

自带版本

yum install nodejs

但是版本很低【6.17.1】

Linux:安装nodejs

高版本

参考:链接

1、删除旧版本

yum remove nodejs

2、添加Node.js Yum存储库  

最新发布:
yum clean all && yum makecache fast
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -

稳定发布:
yum clean all && yum makecache fast
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -

3、安装

yum install nodejs

4、验证

node -v

npm -v

Yarn安装  

参考:链接  

相关文章:

  • 2021-11-09
  • 2021-06-20
  • 2021-12-31
猜你喜欢
  • 2021-12-01
  • 2021-04-01
  • 2021-07-24
  • 2021-10-31
  • 2021-12-21
相关资源
相似解决方案