在用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?<repo> ?To?enable?custom?repositories: ?????yum-config-manager?--enable?<repo></repo></repo>
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
相關視頻教程推薦:linux視頻教程
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦