centos 8的yum源配置,Error: Failed to download metadata for repo 'base'
2022/7/29 5:24:09
本文主要是介绍centos 8的yum源配置,Error: Failed to download metadata for repo 'base',对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
下载阿里源,makecache后报错
[root@python01 yum.repos.d]# yum makecache
CentOS-8 - Base - mirrors.aliyun.com 77 B/s | 2.3 kB 00:30
Errors during downloading metadata for repository 'base':
- Status code: 404 for https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 106.15.218.236)
- Curl error (28): Timeout was reached for http://mirrors.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds]
- Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148)
Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
查了一下centos 8版本的信息,发现官方到2021年12月31日后就不再维护该系统了,而阿里源的正式版本的源也已经关闭,但阿里同时也整了一个centos8-stream版本的源维护: https://mirrors.aliyun.com/centos/8-stream/
解决方法就是,将CentOS-Base.repo原有的内容清除,替换成以下的
[base]
name=CentOS-8-stream - Base - mirrors.aliyun.com
baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
#additional packages that may be useful
[extras]
name=CentOS-8-stream - Extras - mirrors.aliyun.com
baseurl=https://mirrors.aliyun.com/centos/8-stream/extras/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-8-stream - Plus - mirrors.aliyun.com
baseurl=https://mirrors.aliyun.com/centos/8-stream/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
[PowerTools]
name=CentOS-8-stream - PowerTools - mirrors.aliyun.com
baseurl=https://mirrors.aliyun.com/centos/8-stream/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
[AppStream]
name=CentOS-8-stream - AppStream - mirrors.aliyun.com
baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
这篇关于centos 8的yum源配置,Error: Failed to download metadata for repo 'base'的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-14Fetch / Axios学习:入门教程与实战指南
- 2024-11-14Typescript 类型课程入门教程
- 2024-11-14Fetch / Axios课程:初学者必看的网络请求教程
- 2024-11-14Styled-components课程:初学者指南
- 2024-11-13pre-commit 自动化测试课程:入门教程与实践指南
- 2024-11-13什么是AIGC?如何使用AIGC技术辅助办公?
- 2024-11-13Slicm 框架怎么进行用户认证?-icode9专业技术文章分享
- 2024-11-13在查询时将 map_coord 列的值转换为字符串有哪些方法?-icode9专业技术文章分享
- 2024-11-13如何将微信地区改成自定义文案?-icode9专业技术文章分享
- 2024-11-13DNS 缓存存在问题有哪些症状和解决方法?-icode9专业技术文章分享