配置YUM源出现Errno 14 Could not open/read repomd.xml 错误的解决办法

[root@fancy yum.repos.d]# yum  makecache

Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * c6-media: 
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                                             | 3.7 kB     00:00     
base/group_gz                                                                                                                                    | 226 kB     00:00     
base/filelists_db                                                                                                                                | 6.4 MB     00:06     
base/other_db                                                                                                                                    | 2.8 MB     00:02     
file:///media/CentOS/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/CentOS/repodata/repomd.xml
Trying other mirror.



解决办法就是把本地源关闭:
将/etc/yum.repos.d/CentOS-Media.repo里面的enabled=1改成enabled=0即可

因为yum 寻包的顺序应该先是本地源,再寻网络源。

猜你喜欢

转载自blog.csdn.net/qq_23390975/article/details/80751471