The requested URL returned error: 404 Not Found

Recently, partners who use centos6 will encounter the problem that the yum source cannot be downloaded, and the error is as follows:
Y

umRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination

[Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found”

错误:Cannot find a valid baseurl for repo: base

Some online solutions, such as shutting down the firewall; resetting DNS 8.8.8.8; switching to domestic Alibaba Cloud, NetEase and other yum sources, modifying the /etc/yum.repos.d/CentOS-Base.repo file, and other methods, still did not
What is the reason for calling resources through yum command ?

CentoS 6 停止维护更新日期:20201130

CentOS 7 停止维护更新日期:20246

CentOS 8 停止维护更新日期:20295

On December 2, 2020, centos officially stopped all updates to centos6, and removed all centos6 sources, including official sources. At present, centos6 sources such as Ali, 163, and Tsinghua are no longer available.

If you need to use centos6 source, you can use vault.centos.org as the update source of centos.

Modify the file /etc/yum.repos.d/CentOS-Base.repo to the following
command:vi /etc/yum.repos.d/CentOS-Base.repo

[centos-office]
name=centos-office
failovermethod=priority
baseurl=https://vault.centos.org/6.10/os/x86_64/
gpgcheck=1
gpgkey=https://vault.centos.org/6.10/os/x86_64/RPM-GPG-KEY-CentOS-6

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_43674360/article/details/111300657