centos8.0 软件仓库报错Failed to synchronize cache for repo ‘base‘, ignoring this repo.
2022/2/3 7:12:36
本文主要是介绍centos8.0 软件仓库报错Failed to synchronize cache for repo ‘base‘, ignoring this repo.,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
遇到的问题
以使用curl命令安装阿里centos8的镜像仓库,使用dnf repolist查看仓库时遇见如下报错
[root@localhost ~]# yum repolist CentOS-8 - AppStream - mirrors.aliyun.com 0.0 B/s | 0 B 00:24 CentOS-8 - Base - mirrors.aliyun.com 0.0 B/s | 0 B 00:24 Failed to synchronize cache for repo 'AppStream', ignoring this repo. Failed to synchronize cache for repo 'base', ignoring this repo. Last metadata expiration check: 0:23:35 ago on Wed 02 Feb 2022 08:52:22 AM EST. repo id repo name status extras CentOS-8 - Extras - mirrors.aliyun.com 38
解决方法
查看dnf日志文件(/var/log/dnf.log)
2022-02-02T14:37:46Z DEBUG Cannot download 'https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried. 2022-02-02T14:37:46Z DEBUG repo: downloading from remote: base 2022-02-02T14:37:56Z DEBUG not found other for: CentOS-8 - Base - mirrors.aliyun.com 2022-02-02T14:37:56Z DEBUG not found modules for: CentOS-8 - Base - mirrors.aliyun.com
发现报错原因,并参试使用浏览器访问该网站,发现访问不了,可能是阿里方面维护或下线了该仓库
将软件仓库更改成华为仓库
# 删除原来的阿里软件仓库 [root@localhost ~]# rm -rf /etc/yum.repos.d/CentOS-Base.repo # 下载华为centos8版本的软件仓库 [root@localhost ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-8-reg.repo
再次测试仓库是否可用
# 清理仓库缓存 [root@localhost ~]# dnf clean all # 重新生成缓存并查看仓库软件包数量 [root@localhost ~]# dnf repolist CentOS-8 - AppStream - repo.huaweicloud.com 2.0 MB/s | 8.4 MB 00:04 CentOS-8 - Base - repo.huaweicloud.com 1.6 MB/s | 4.6 MB 00:02 CentOS-8 - PowerTools - repo.huaweicloud.com 866 kB/s | 2.3 MB 00:02 CentOS-8 - Extras - repo.huaweicloud.com 4.3 kB/s | 10 kB 00:02 repo id repo name status AppStream CentOS-8 - AppStream - repo.huaweicloud.com 5,596 BaseOS CentOS-8 - Base - repo.huaweicloud.com 1,896 PowerTools CentOS-8 - PowerTools - repo.huaweicloud.com 1,693 extras CentOS-8 - Extras - repo.huaweicloud.com 38
可以看到,软件仓库已经没有问题
这篇关于centos8.0 软件仓库报错Failed to synchronize cache for repo ‘base‘, ignoring this repo.的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-06-30uniAPP 实现全屏左右滚动滚动的效果-icode9专业技术文章分享
- 2024-06-30如何在本地使用授权或插件-icode9专业技术文章分享
- 2024-06-30伪静态规则配置方法汇总-icode9专业技术文章分享
- 2024-06-29易优CMS安装常见问题汇总-icode9专业技术文章分享
- 2024-06-28易优新手必读安装教程-icode9专业技术文章分享
- 2024-06-28忘记eyoucms后台密码怎么办?-icode9专业技术文章分享
- 2024-06-26终极指南:Scrum中如何设置需求优先级
- 2024-06-26AI大模型企业应用实战(25)-为Langchain Agent添加记忆功能
- 2024-06-26小白家庭 nas 搭建方案-icode9专业技术文章分享
- 2024-06-23AI大模型企业应用实战(14)-langchain的Embedding