详解CentOS8更换yum源后出现同步仓库缓存失败的问题

简介: 详解CentOS8更换yum源后出现同步仓库缓存失败的问题

不知道为啥就开始出现同步仓库缓存失败的问题,无法正常安装一些工具包。错误提示如下:

上报错!!!

然后百思不得其解,我寻思系统默认的yum源可能因为网络的原因连不上也就算了,国内的源不应该啊,是不是配置有问题呢?结果还真是,baseurl中的$releasever和$basearch占位符不知为何无效。故将$releasever改为8,将$basearch改为x86_64后问题解决。修改后的各个配置文件内容如下:

### cat CentOS-Base.repo ###
[base]
name=CentOS-8 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/
     http://mirrors.aliyuncs.com/centos/8/BaseOS/x86_64/os/
     http://mirrors.cloud.aliyuncs.com/centos/8/BaseOS/x86_64/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
### cat CentOS-AppStream.repo ###
[AppStream]
name=CentOS-8 - AppStream - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8/AppStream/x86_64/os/
     http://mirrors.aliyuncs.com/centos/8/AppStream/x86_64/os/
     http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
### cat CentOS-Extras.repo ###
[extras]
name=CentOS-8 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8/extras/x86_64/os/
     http://mirrors.aliyuncs.com/centos/8/extras/x86_64/os/
     http://mirrors.cloud.aliyuncs.com/centos/8/extras/x86_64/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
### cat CentOS-Epel.repo ###
[epel]
name=CentOS-$releasever - Epel
baseurl=http://mirrors.aliyun.com/epel/8/Everything/$basearch
enabled=1
gpgcheck=0
### cat CentOS-PowerTools.repo ###
[PowerTools]
name=CentOS-8 - PowerTools - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8/PowerTools/x86_64/os/
     http://mirrors.aliyuncs.com/centos/8/PowerTools/x86_64/os/
     http://mirrors.cloud.aliyuncs.com/centos/8/PowerTools/x86_64/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
### cat CentOS-centosplus.repo ###
[centosplus]
name=CentOS-8 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/8/centosplus/x86_64/os/
     http://mirrors.aliyuncs.com/centos/8/centosplus/x86_64/os/
     http://mirrors.cloud.aliyuncs.com/centos/8/centosplus/x86_64/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

做完以上修改后问题解决,没有再提示同步仓库缓存失败了:

 

目录
相关文章
|
canal 缓存 NoSQL
Redis缓存与数据库如何保证一致性?同步删除+延时双删+异步监听+多重保障方案
根据对一致性的要求程度,提出多种解决方案:同步删除、同步删除+可靠消息、延时双删、异步监听+可靠消息、多重保障方案
Redis缓存与数据库如何保证一致性?同步删除+延时双删+异步监听+多重保障方案
|
Linux
Centos6配置阿里云yum源报错
在CentOS 6配置阿里云Yum源时,可能出现EPEL仓库访问报错(404 Not Found)。解决方法:编辑`/etc/yum.repos.d/epel.repo`文件,将`enabled`和`gpgcheck`参数设为0 ``` 此设置可解决仓库无法访问的问题。
2577 29
|
关系型数据库 MySQL Linux
MySQL8官方YUM仓库使用指南
MySQL 8 是广受欢迎的开源关系数据库管理系统,引入了诸多新特性和性能提升。本文介绍如何在 Linux 上通过 MySQL 官方 YUM 仓库安装和管理 MySQL 8。首先配置 YUM 仓库并安装 MySQL,启动服务后获取临时密码并登录。接着创建数据库与用户,使用 SQL 命令创建表格、插入及查询数据。此方法简便高效,适合快速上手 MySQL 8 的基本操作。
1350 13
|
缓存 Linux 数据库
CentOS 8中 更新或下载时报错:为仓库 ‘appstream‘ 下载元数据失败 : Cannot prepare internal
通过以上步骤,您可以有效地解决 CentOS 8 中“为仓库 ‘appstream’ 下载元数据失败 : Cannot prepare internal”问题。关键在于检查网络连接、更新和切换仓库配置、清理缓存、重建 RPM 数据库以及在必要时临时禁用有问题的仓库。通过这些方法,可以确保系统能够正常进行软件包的更新和下载操作。
4348 20
|
缓存 Linux
CentOS-6的iso下载地址镜像yum源
通过上述步骤,您可以成功下载CentOS 6的ISO镜像文件,并配置适用于CentOS 6的YUM源。尽管CentOS 6已经停止更新,但使用这些镜像和YUM源配置,可以继续在需要的环境中使用和维护CentOS 6系统。
8908 20
|
Linux 虚拟化 开发者
一键将CentOs的yum源更换为国内阿里yum源
一键将CentOs的yum源更换为国内阿里yum源
24290 31
CentOs9 yum源出现404问题
CentOs9-stream yum源出现404问题
|
缓存 Linux
解决CentOS 7停止更新后yum源失效问题【图文教程】
以上步骤完成后,你的 CentOS 7 系统就会使用阿里云的 yum 源,更换yum以后就可以正常使用啦。
16240 2
centos使用阿里的yum源
centos使用阿里的yum源
2042 0
|
缓存 NoSQL 关系型数据库
美团面试:MySQL有1000w数据,redis只存20w的数据,如何做 缓存 设计?
美团面试:MySQL有1000w数据,redis只存20w的数据,如何做 缓存 设计?
美团面试:MySQL有1000w数据,redis只存20w的数据,如何做 缓存 设计?