1. 程式人生 > 其它 >阿里雲centos系統yum源錯誤解決方法

阿里雲centos系統yum源錯誤解決方法

阿里雲ESC雲主機centos系統yum更新時,會遇到類似如下404等錯誤:
http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror.
http://mirrors.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host" Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
藍葉經過研究發現阿里雲的yum源好多都不完善,才會出現以上錯誤導致yum源無法更新,解決方法只需要按照以下步驟修改檔案就可以解決阿里雲centos系統yum源錯誤,如果懂命令就登陸ssh使用命令修改,如果是新手可以使用winscp登陸後下載/etc/yum.repos.d/

目錄下的CentOS-Base.repoepel.repo檔案進行修改。

把CentOS-Base.repo檔案中的以下網址
http://mirrors.aliyun.com/centos/
http://mirrors.aliyuncs.com/centos/
http://mirrors.cloud.aliyuncs.com/centos/
修改成
http://mirrors.aliyun.com/centos-vault/centos/
 
把epel.repo檔案中的
enabled=1修改enabled=0