CentOS 8 download stuff Error: yum Failed to download metadata for repo 'AppStream' error

mistake

insert image description here
I am using Alibaba Cloud's lightweight server.
I have found a lot of solutions, but most of them are to modify the file and replace the image address in the file with the address of domestic Alibaba,
but the problem is not at all in
the server I bought. I configured the address of yum in advance, and it
took me a long time to change the file, but it still didn't work.
remember to backup
In case you delete the wrong file, back it up and still find the source file, otherwise it will be a bit of a hassle (maybe not a little bit)

Solution

My solution is to delete the file.
You first go to /etc/yum.repos.d. The
reason for the error is because you have duplicated files on Linux
. Just delete the CentOS-AppStream.repo that reported the error and you’re done. If there is an
error of 'AppStream', delete CentOS-AppStream.repo

failovermethod=priority error

This error is also recorded by the way.
This error is because this configuration is not needed now. The
solution is very simple
. Delete it and you are done.
Find this folder and comment out this line and you are done.

Off topic

Today I did two things in one day: the whole yum and the configuration of MySQL.
I really stepped on all the pits that I could step on.
Watching the online courses of Shang Silicon Valley, because they recorded this part of the online courses in 18 years,
their system is still centos6. 8 The installed mysql version is also at 5:00. There is no way but to find the information and learn to install it. But now the information on the Internet is really difficult to describe. Several articles jump back and forth, and the same article appears on several different websites at the same time. The title is still The difference is really amazing.
It's really not easy to learn something.


If you are Alibaba Cloud Lightweight Server

Update on March 1, 2022
The yum in Alibaba Cloud's server is already configured and fully usable. You don't need to modify the configuration file.
Why do I know
because after I reset the server, I found that the configuration file yum is not modified. can be used normally

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324143608&siteId=291194637