yum makecache报错Error: Cannot retrieve repository metadata (repomd.xml)

2021/10/12 7:17:09

本文主要是介绍yum makecache报错Error: Cannot retrieve repository metadata (repomd.xml),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

yum makecache报错:

Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

 

解决办法:

vim /etc/yum.repos.d/epel.repo

修改文件中的 [epel] 部分,把 

enabled=1 改为 enabled=0

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://mirrors.aliyun.com/epel/6/$basearch
failovermethod=priority
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

 

然后执行:yum makecache

[root@localhost yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, security, upgrade-helper
Repository base is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Determining fastest mirrors
 * webtatic: us-east.repo.webtatic.com
base                                                                                                                                                                                                                                                   | 3.7 kB     00:00     
extras                                                                                                                                                                                                                                                 | 3.4 kB     00:00     
extras/filelists_db                                                                                                                                                                                                                                    |  32 kB     00:00     
extras/prestodelta                                                                                                                                                                                                                                     |  605 B     00:00     
extras/primary_db                                                                                                                                                                                                                                      |  31 kB     00:00     
extras/other_db                                                                                                                                                                                                                                        |  37 kB     00:00     
update                                                                                                                                                                                                                                                 | 3.4 kB     00:00     
update/filelists_db                                                                                                                                                                                                                                    | 5.5 MB     00:00     
update/prestodelta                                                                                                                                                                                                                                     | 266 kB     00:00     
update/primary_db                                                                                                                                                                                                                                      | 8.0 MB     00:00     
update/other_db                                                                                                                                                                                                                                        | 355 kB     00:00     
updates                                                                                                                                                                                                                                                | 3.4 kB     00:00     
updates/filelists_db                                                                                                                                                                                                                                   | 2.8 MB     00:00     
updates/prestodelta                                                                                                                                                                                                                                    | 425 kB     00:00     
updates/primary_db                                                                                                                                                                                                                                     | 4.4 MB     00:00     
updates/other_db                                                                                                                                                                                                                                       |  43 MB     00:04     
upg                                                                                                                                                                                                                                                    | 1.9 kB     00:00     
upg/filelists_db                                                                                                                                                                                                                                       | 130 kB     00:00     
upg/primary_db                                                                                                                                                                                                                                         |  14 kB     00:00     
upg/other_db                                                                                                                                                                                                                                           |  18 kB     00:00     
webtatic                                                                                                                                                                                                                                               | 3.6 kB     00:00     
webtatic/group_gz                                                                                                                                                                                                                                      |  374 B     00:00     
webtatic/filelists_db                                                                                                                                                                                                                                  | 121 kB     00:00     
webtatic/primary_db                                                                                                                                                                                                                                    | 229 kB     00:00     
webtatic/other_db                                                                                                                                                                                                                                      |  60 kB     00:00     
Metadata Cache Created

 

问题解决。

 



这篇关于yum makecache报错Error: Cannot retrieve repository metadata (repomd.xml)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程