最近给 CentOS 6 服务器安装软件时出现了错误:
[root@localhost ~]# yum install tree
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404”
Trying other mirror.
解决方法1:
- 使用
vi /etc/yum.repos.d/CentOS-Base.repo
命令编辑yum 配置文件。 - 然后将里面的默认内容全部删除,再替换成以下内容:
[base]
name=CentOS-$releasever - Base
failovermethod=priority
baseurl