本文摘自PHP中文网,作者尚,侵删。

在用yum安装gcc的时候,报了错误:
1 2 3 4 5 6 7 8 9 | [root@001 ~]#yum -y install gcc gcc-c++ kernel-devel
Loaded plugins: fastestmirror, langpacks
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 <repo>
To enable custom repositories:
yum-config-manager --enable <repo>
|
1、检查是否断网
2、如果没断网,则说明是yum镜像没有了,需要下载一个:
1 2 3 4 5 6 7 8 9 | cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.backup
wget http:
mv CentOS6-Base-163.repo CentOS-Base.repo
yum clean all
|
相关视频教程推荐:linux视频教程
以上就是centos yum无法使用怎么解决的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
CentOS无法ping通网关
ssh连接不上CentOS怎么办?
CentOS无法解析域名
CentOS下ip能ping通域名ping不通怎么办
怎么查看CentOS的版本
如何解决u盘装CentOS无法进入系统
CentOS打不开eclipse怎么办?
CentOS怎么重启
CentOS下中文字符总是乱码
CentOS系统的日志文件在哪
更多相关阅读请进入《CentOS》频道 >>
转载请注明出处:木庄网络博客 » centos yum无法使用怎么解决