yum 报错 [Errno 14] Could not open/read file:///media/iso/repodata/repomd.xml
Posted canger
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了yum 报错 [Errno 14] Could not open/read file:///media/iso/repodata/repomd.xml相关的知识,希望对你有一定的参考价值。
yum执行安装命令报错
1.yum安装时,需要确定安装源,安装源的配置在/etc/yum.repos.d/中,每个源对应一个文件(以.repo为后缀),如果只配置了本地源,而此时安装光盘(即ISO文件)没有挂载的话自然无法找到安装文件
此时要么挂载ISO至指定目录,要目就配置新的网络安装源
2.新建网络安装源配置,名字CentOS-Base.repo
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
3.执行命令
yum clean all
yum makecache
4 如果出现
[Errno 14] PYCURL ERROR 6 - "Couldn‘t resolve host ‘ftp.sjtu.edu.cn‘"
以上是关于yum 报错 [Errno 14] Could not open/read file:///media/iso/repodata/repomd.xml的主要内容,如果未能解决你的问题,请参考以下文章
GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
[已解决]报错: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/
CentOS7.3yum安装MariaDB报错[Errno 256]
Centos7系统安装yum遇到的问题failure: repodata/repomd.xml from base: [Errno 14] 网络不可达。
CentOS yum 命令出现 [Errno 14] curl#6 - "Couldn't resolve host ..." 的解决方法(代码片段