在用yum安装gcc的时候,报了错误:
[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 To enable custom repositories: yum-config-manager --enable
1、检查是否断网
ping www.baidu.com
2、如果没断网,则说明是yum镜像没有了,需要下载一个:
cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.backup wget http://mirrors.163.com/.help/CentOS6-Base-163.repo mv CentOS6-Base-163.repo CentOS-Base.repo yum clean all
以上就是“centos yum无法使用怎么解决”的详细内容,更多请关注1818ip网其它相关文章!
相关文章
标签:CentOS
- •centos中的uuid是必须的吗 centos安装minicom必须联网吗
- •centos如何查看用户 centos如何查看用户密码
- •centos重启后时间不对怎么办 centos时间不同步怎么解决
- •如何解决centos7下chrome打不开的问题 centos安装chrome
- •centos下ping不通网关怎么办 centos ping不通网关怎么解决
- •centos7系统找不到网卡 centos7装完系统找不到网卡
- •centos中pear命令无法使用怎么办 pear是什么意思
- •centos怎么实现开机进入命令行模式 centos7开机进入命令行模式
- •centos无法进入图形界面怎么解决 centos无法进入图形界面
- •centos默认用户名密码是什么 centos默认用户名密码