Karp

阿里云 Centos6.5 yum install 时会遇到类似如下404等错误 http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml
阿里云 Centos6.5 yum install时会遇到类似如下404等错误:$ yum install -y ...
扫描右侧二维码阅读全文
24
2021/04

阿里云 Centos6.5 yum install 时会遇到类似如下404等错误 http://mirrors.aliyun.com/centos/6/os/x86_64/repodata/repomd.xml

阿里云 Centos6.5 yum install时会遇到类似如下404等错误:

$ yum install -y gcc gcc-c++ autoconf libjpeg libjpeg-devel enchant-devel pam-devel  libc-client libc-client-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel  bzip2 bzip2-devel ncurses curl openssl-devel gdbm-devel db4-devel libXpm-devel  libX11-devel gd-devel gmp-devel readline-devel libxslt-devel expat-devel  xmlrpc-c xmlrpc-c-devel

Loaded plugins: security
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 12] Timeout on http://mirrors.aliyuncs.com/centos/6/os/x86_64/repodata/repomd.xml: (28, 'connect() timed out!')
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

进入 /etc/yum.repos.d/目录

修改下面文件 CentOS-Base.repoepel.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文件中的 enabled=1修改enabled=0
亲测有效 

Last modification:April 24th, 2021 at 03:50 am

Leave a Comment