【已解决】yum install npm node失败,提示No package npm available

问题描述

Centos7环境,yum install npm失败,报错:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
No package npm available.
Error: Nothing to do

网上的方法都比较陈旧了,始终不能安装成功,终于在StackExchange上找到了答案,亲测有效。

解决方法

用sudo或者root执行以下命令:

yum install epel-release
yum install npm nodejs

解决时间

2022年3月13日 下午11:08:37
原答案链接:https://serverfault.com/questions/611791/centos-7-cant-yum-install-npm

如果有用,记得点个赞~

你可能感兴趣的:(Linux,npm,前端,node.js)