Karp 的技术博客

阿里云 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
亲测有效

centos

版权属于:karp
作品采用:本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
更新于: 2021年04月24日 02:11
3

目录

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