执行 yum install等命令,产生错误。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
本文主要介绍在CentOS 5系统中执行yum命令报错的解决方法。
执行 yum install等命令,产生错误。
配置的yum源出错,在mirrors.aliyun.com/centos/5/中没有如下截图中的文件,只有一个readme文件。
#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 - mirrors.aliyun.com failovermethod=priority baseurl=http://vault.centos.org/5.11/os/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os gpgcheck=1 gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-5
#released updates [updates] name=CentOS-$releasever - Updates - mirrors.aliyun.com failovermethod=priority baseurl=http://vault.centos.org/5.11/updates/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates gpgcheck=1 gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful [extras] name=CentOS-$releasever - Extras - mirrors.aliyun.com failovermethod=priority baseurl=http://vault.centos.org/5.11/extras/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras gpgcheck=1 gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons - mirrors.aliyun.com failovermethod=priority baseurl=http://vault.centos.org/5.11/addons/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus - mirrors.aliyun.com failovermethod=priority baseurl=http://vault.centos.org/5.11/centosplus/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus gpgcheck=1 enabled=0 gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib - mirrors.aliyun.com failovermethod=priority baseurl=http://vault.centos.org/5.11/contrib/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-5 2. 重新执行yum命令,恢复正常。