您的位置:首页 > 运维架构 > Linux

centos yum时总出错

2015-08-04 16:32 686 查看


yum错误:

*
c5-media:

file:///media/CentOS/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] 没有那个文件或目录: '/media/CentOS/repodata/repomd.xml'

Trying other mirror.

file:///media/cdrecorder/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] 没有那个文件或目录: '/media/cdrecorder/repodata/repomd.xml'

Trying other mirror.

file:///media/cdrom/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] 没有那个文件或目录: '/media/cdrom/repodata/repomd.xml'

Trying other mirror.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: c5-media. Please verify its path and try again

CentOS 5.2光盘安装后,安装Yum,配置/etc/yum.repos.d/CentOS-Base.repo文件,

然后执行yum install ***

总是出现下列错误

file://media/CentOS_5.2_Final/repodata/repomd.xml:[Error 5] OSError:[Errno 2]

Trying other mirror.

Error: Cannot retrieve repository metadata(repomd.xml) for repository: c5-media.

Please verify its path and try again

问题原因:/etc/yum.repos.d目录下配置文件

CentOS-Media.repo文件影响Yum访问源

解决方法:将CentOS-Media.repo文件删除

重试yum install ***

正常了。

附配置文件/etc/yum.repos.d/CentOS-Base.repo全文

[base]

name=CentOS-5 - Base

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&

repo=os

#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/os/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#released updates

[update]

name=CentOS-5 - Updates

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/updates/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#packages used/produced in the build but not released

[addons]

name=CentOS-5 - Addons

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/addons/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that may be useful

[extras]

name=CentOS-5 - Extras

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/extras/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-5 - Plus

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#contrib - packages by Centos Users

[contrib]

name=CentOS-5 - Contrib

#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: