打开linux准备安装个gcc 结果发现出现了这个提示
http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror.
http://mirrors.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host" Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
意思是yum的源url出了问题,阿里云之前的源url路径已经不能用了重新更新一下就好了。
进入/etc/yum.repos.d/文件夹下
cd /etc/yum.repos.d/
修改文件夹下 CentOS-Base.repo 文件
vi CentOS-Base.repo
把CentOS-Base.repo文件中的以下网址
http://mirrors.aliyun.com/centos/
http://mirrors.aliyuncs.com/centos/
http://mirrors.cloud.aliyuncs.com/centos/
修改为
http://mirrors.aliyun.com/centos-vault/centos/
注意全部修改。
然后修改epel.repo
vi epel.repo
enabled=1修改enabled=0
之后再使用yum就可以了。