Cause of the problem: At first, the default yum source of CentOS 8 can be used normally, but after installing Development Tools using the following command: yum groupinstall -y "Development Tools" I don't know why the problem of synchronizing the warehouse cache failed to occur, and some tool packages could not be installed normally. The error message is as follows: [root@localhost /etc/yum.repos.d]# yum makecache CentOS-8.0 - AppStream 19 B/s | 38 B 00:02 CentOS-8.0 - Base 24 B/s | 38 B 00:01 CentOS-8.0 - Extras 8.4 B/s | 38 B 00:04 Failed to sync cache for repository 'AppStream', ignoring this repo. Failed to sync cache of repository 'BaseOS', ignoring this repo. Failed to sync cache of repository 'extras', ignoring this repo. The metadata cache is established. [root@localhost /etc/yum.repos.d]# So I searched for relevant solutions online according to the error message. Most of them said to change Alibaba's yum source, so I changed it according to the instructions in the official document: https://developer.aliyun.com/mirror/centos I thought I had solved the problem successfully, but there was still a pitfall. When I re-established the metadata cache, it still prompted that the synchronization warehouse cache failed: [root@mesos-master /etc/yum.repos.d]# yum makecache CentOS-8.0 - AppStream - mirrors.aliyun.com 0.0 B/s | 0 B 00:24 CentOS-8.0 - Base - mirrors.aliyun.com 0.0 B/s | 0 B 00:32 CentOS-8.0 - Extras - mirrors.aliyun.com 0.0 B/s | 0 B 00:32 CentOS-8.0 - Epel 2.3 MB/s | 6.0 MB 00:02 WANdisco SVN Repo 1.9 2.0 kB/s | 121 kB 01:01 Failed to sync cache for repository 'AppStream', ignoring this repo. Failed to sync repository 'base' cache, ignoring this repo. Failed to sync cache of repository 'extras', ignoring this repo. Last metadata expiration check: 0:00:01 ago, performed on Monday, March 23, 2020 at 10:26:48. The metadata cache is established. [root@mesos-master /etc/yum.repos.d]# Then I was puzzled. I thought that the system's default yum source might not be able to connect due to network problems, but the domestic source shouldn't be able to connect. Is there a problem with the configuration? It turns out that the $releasever and $basearch placeholders in baseurl are invalid for some reason. Therefore, the problem was solved by changing $releasever to 8 and $basearch to x86_64. The contents of the modified configuration files are as follows: ### 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 After making the above changes, the problem is solved and there is no prompt that the synchronization warehouse cache failed: [root@localhost /etc/yum.repos.d]# yum makecache CentOS-8 - AppStream - mirrors.aliyun.com 2.1 MB/s | 6.5 MB 00:03 CentOS-8 - Base - mirrors.aliyun.com 1.6 MB/s | 5.0 MB 00:03 CentOS-8 - Extras - mirrors.aliyun.com 1.8 kB/s | 4.2 kB 00:02 CentOS-8.0 - Epel 2.2 MB/s | 6.0 MB 00:02 WANdisco SVN Repo 1.9 10 kB/s | 121 kB 00:11 The metadata cache is established. [root@localhost /etc/yum.repos.d]# This is the end of this article about the problem of failure to synchronize warehouse cache after changing yum source in CentOS8. For more related content about failure to synchronize warehouse after changing yum source in CentOS8, please search previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Solution to the problem of eight hours difference in MySQL insertion time
>>: Detailed explanation of the failure of MySQL to use UNION to connect two queries
1. Two ways to specify the character set of the h...
Flash enabled designers and developers to deliver...
Preface We all know that MySQL query uses the sel...
In this section, we will learn about list element...
Table of contents 1. Install dependencies 2. Conf...
The mathematical expression calc() is a function ...
“How to make a website look high-end? Or more des...
First install ssh in Linux, taking centos as an e...
Table of contents 1. beforeCreate and created fun...
This article shares the specific code of writing ...
Table of contents Preface start Preface The defau...
This article example shares the specific code of ...
In the MySQL documentation, MySQL variables can b...
Table of contents 1. Monitoring port Relationship...
Flexible layout (Flexbox) is becoming increasingl...