天天看點

centos7出現yum之類的問題的時候可能是加入的一些源導緻的問題最佳的解決方案就是-look me

//傻逼的我胡搞出現不知道添加什麼軟體源到/etc/yum.repo中結果出現了一堆錯-搜了很長時間沒解決-算了-返璞歸真(回到初始的狀态)吧,看了一下别人的阿裡雲的伺服器中初始的時候都有什麼源 結果就(CentOS-Base.repo ,epel.repo)就這兩個源 好吧現在把所有的除了這兩個源都程式設計 **.repo.bak

然後 yum clean all yum makecache

這樣就可以了

[root@iz2ze1ci0m3dzopy4m0byfz ~]# yum update

Loaded plugins: fastestmirror

base | 3.6 kB 00:00:00

epel | 3.2 kB 00:00:00

extras | 3.4 kB 00:00:00

mysql-connectors-community | 2.5 kB 00:00:00

mysql-tools-community | 2.5 kB 00:00:00

mysql57-community | 2.5 kB 00:00:00

Could not retrieve mirrorlist ​​​http://apt.sw.be/redhat/el6/en/mirrors-rpmforge​​​ error was

14: curl#6 - “Could not resolve host: apt.sw.be; Name or service not known”

​​​http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml​​​: [Errno 14] curl#6 - “Could not resolve host: apt.sw.be; Name or service not known”

Trying other mirror.

1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=rpmforge ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable rpmforge
    or
        subscription-manager repos --disable=rpmforge

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=rpmforge.skip_if_unavailable=true