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
相关文章推荐
- CentOS6.4升级python2.6.6到3.4.3
- linux文件系统如何进行文件存取
- Window文件目录挂载(mount)到linux系统目录下
- linux 远程桌面:SSH
- centos7.0_redhat7.0安装vncserver和Desktop桌面
- 查看Linux下*.a库文件中文件、函数、变量等情况
- linux 克隆:device eth0 does not seem to be present,delaying initialization
- Linux命令之find
- Linux异步------signal
- Linux下Weblogic 11g R1安装和配置
- 嵌入式LINUX入门到实践(二)
- Linux中ifreq 结构体分析和使用
- linux下的22个特殊符号
- centos文件新建、删除、移动、复制等命令
- Linux上的free命令详解
- 在CentOS 安装R语言
- 开发的某条delete报错
- Linux下Nagios的安装与配置
- linux下使用C++ Json库
- 每天一个linux命令:crontab命令