不灭的焱

革命尚未成功,同志仍须努力下载JDK17

作者:Albert.Wen  添加时间:2013-04-13 15:39:56  修改时间:2024-08-31 06:56:14  分类:Linux软件安装/参数优化  编辑

下载163的yum源文件:

wget  http://mirrors.163.com/.help/CentOS-Base-163.repo

然后运行命令:

yum  makecache

系统报如下错误:

[root@localhost yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, 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://mirror.centos.org/centos/6/addons/i386/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

 

分析:

从上可看出,提示的是 404错误,即找不到相关文件,估计地址 “http://mirrors.163.com/.help/CentOS-Base-163.repo” 太老,而我用的是最新的 CentOS 6.3,登录到163 yum源的官网(http://mirrors.163.com/.help/centos.html),发现如下信息:

CentOS 5.X系列的 yum源地址为:

http://mirrors.163.com/.help/CentOS5-Base-163.repo

而CentOS 6.X系列的yum源地址为:

http://mirrors.163.com/.help/CentOS6-Base-163.repo

注意红色数字,是有区别的,也就是说,我下载的 “CentOS-Base-163.repo” 是错误的,尽管能被下载下来。

重新下载新版本的“CentOS6-Base-163.repo”,问题解决。

 

附:更改CentOS 6.3 yum源为国内163源