在linux安装gcc过程中报错
已加载插件:aliases, fastestmirror, protectbase
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run “yum repolist all” to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable
To enable custom repositories:
yum-config-manager --enable
如图↓

解决办法
依次输入
- wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
- yum clean all
- yum makecache
最后再安装一次 - yum install -y gcc
OK!解决
文章讲述了在Linux中安装GCC时遇到错误,通过添加阿里云镜像源并更新yum仓库,解决了yum加载问题,给出了具体步骤:替换默认仓库为阿里云镜像,清理缓存,重新加载和安装GCC。
1万+

被折叠的 条评论
为什么被折叠?



