報(bào)錯日志:
l/var/cache/yum/x86_64/$releasever/docker-ce-stable/repomd.xml
[root@node01 yum.repos.d]# rpm -import http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-7
[root@node01 yum.repos.d]# yum install vim
Loaded plugins: aliases, protectbase
http://mirrors.aliyun.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
^Chttp://mirrors.aliyuncs.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
Trying other mirror.
http://mirrors.cloud.aliyuncs.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Name or service not known"
Trying other mirror.
docker-ce-stable? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | 3.5 kB? 00:00:00
http://mirrors.aliyun.com/centos/%24releasever/extras/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
^Chttp://mirrors.aliyuncs.com/centos/%24releasever/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
Trying other mirror.
http://mirrors.cloud.aliyuncs.com/centos/%24releasever/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Name or service not known"
Trying other mirror.
One of the configured repositories failed (CentOS-$releasever - Extras - mirrors.aliyun.com),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
? ? 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=extras ...
? ? 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 extras
? ? ? ? or
? ? ? ? ? ? subscription-manager repos --disable=extras
? ? 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=extras.skip_if_unavailable=true
failure: repodata/repomd.xml from extras: [Errno 256] No more mirrors to try.
http://mirrors.aliyun.com/centos/$releasever/extras/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
http://mirrors.aliyuncs.com/centos/$releasever/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Name or service not known"
問題描述:
我在安裝CDH時(shí)安裝失敗后葬毫,我刪除了CDH相關(guān)的配置,誤刪了一些系統(tǒng)配置文件闯捎,然后在使用yum安裝vim插件時(shí)報(bào)錯
解決方案:
于是我換成了aliyun的鏡像撒蟀,之后無論是執(zhí)行 yum clean all / yum update 都會有報(bào)錯
當(dāng)然我們?nèi)绻薪?jīng)驗(yàn)的開發(fā)者會一眼發(fā)現(xiàn)問題之所在:
http://mirrors.aliyuncs.com/centos/$releasever/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
這個(gè)鏡像地址有個(gè)很重要的信息:$releasever?
這是一個(gè)系統(tǒng)版本的引用變量叙谨,結(jié)果是引用失敗的,
正確地址應(yīng)該是(我的操作系統(tǒng)是centos7):
http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/repomd.xml
我對?/etc/yum.repos.d/CentOS-Base.repo 這個(gè)文件進(jìn)行了更改
把所有的系統(tǒng)引用變量($releasever?)改為你的系統(tǒng)版本即可
問題就此解決