配置YUM源出現Errno 14 Could not open/read repomd.xml 錯誤的解決辦法


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.
file:///media/cdrecorder/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrecorder/repodata/repomd.xml
Trying other mirror.
file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/cdrom/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: c6-media. Please verify its path and try again
解決辦法就是把本地源關閉:將/etc/yum.repos.d/CentOS-Media.repo里面的enabled=1改成enabled=0即可,因為yum尋包的順序應該先是本地源,再尋網絡源。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM