在centos
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
问题原因:/etc/yum.repos.d目录下配置文件
CentOS-Media.repo文件影响Yum访问源-默认光盘安装留下的
解决方法:将CentOS-Media.repo文件删除
重试yum install ***
附:
阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/
CentOS系统更换软件安装源
第一步:备份你的原镜像文件,以免出错后可以恢复。mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
第二步:下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
第三步:运行yum makecache生成缓存yum clean all
yum makecache