Modify Cenos6.8 YumRepo Error: All mirror URLs are not using ftp, http[s] or file, 404 Not Found after modifying yum source

created at 08-17-2021 views: 2

solution

try 1

vim /etc/yum/pluginconf.d/fastestmirror.conf

Change enable=1 to 0

[main]
enabled=0 #Change from 1 to 0 to disable the plug-in
verbose=0
always_print_best_host = true
socket_timeout=3
# Relative paths are relative to the cachedir (and so works for users as well
# as root).
hostfilepath=timedhosts.txt
maxhostfileage=10
maxthreads=15
#exclude=.gov, facebook
#include_only=.nl,.de,.uk,.ie

2.YUM source to configure
vim /etc/yum.conf

plugins=0 #Change from 1 to 0 to not use plugins

if the above method invalid, see bellow.

try 2

Back up configuration files to prevent bad recovery after errors in the future

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

Execute the following command to create a new CentOS-Base.repo configuration:

vim /etc/yum.repos.d/CentOS-Base.repo

Copy and paste the following command

[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

Save and exit
you may execute yum list normally without error

Please log in to leave a comment.