Download the 163 yum source file: wgethttp: // example
Download the yum source file 163:
Wget http://mirrors.163.com/.help/CentOS-Base-163.repo
Then run the following command:
Yum makecache
The system reports the following error:
[Root @ localhost yum. repos. d] # yum makecache
Loaded plugins: * estmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* Addons: mirrors.163.com
* Base: mirrors.tuna.tsinghua.edu.cn
* Extras: mirrors.tuna.tsinghua.edu.cn
* Updates: mirrors.tuna.tsinghua.edu.cn
Http://mirrors.163.com/
Centos/6/addons/i386/repodata/repomd. xml: [Errno 14] pycurl error 22-"The requested URL returned error: 404"
Trying other mirror.
Http://developer.centos.org/centos/6/addons/ I #/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22-"The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd. xml) for repository: addons. Please verify its path and try again
Analysis:
We can see that error 404 is prompted, that is, the relevant file cannot be found. it is estimated that the address "http://mirrors.163.com/.help/centos-base-163.repo" is too old, while I use the latest CentOS 6.3, log on to the 163yum source site (http://mirrors.163.com/.help/centos.html), found the following information:
The yum source address of CentOS 5.x series is:
Http://mirrors.163.com/.help/CentOS-Base-163.repo
The yum source address of CentOS 6. X series is:
Http://mirrors.163.com/.help/CentOS-Base-163.repo
Note that there is a difference between red numbers, that is, the "CentOS-Base-163.repo" I downloaded is wrong, even though it can be downloaded.
Download the new version of CentOS6-Base-163.repo again and the issue is resolved.