Solve the error of centos7 using Yum installation software: cannot find a valid baseurl for repo: base / 7 / x86_ sixty-four

when using Yun to install software, sometimes repo file errors will be reported. The main problem is caused by CentOS- Base.repo File

Solution: change the file suffix to make the file invalid

[ root@localhost ~]# cd /etc/ yum.repos .d/

[ root@localhost yum.repos .d]# mv CentOS- Base.repo CentOS- Base.repo.bak

[ root@localhost yum.repos .d]# ls
CentOS- Base.repo.bak CentOS- Debuginfo.repo CentOS- Media.repo CentOS- Vault.repo
CentOS- CR.repo CentOS- fasttrack.repo CentOS- Sources.repo

you can continue to install Yum next

===================================================================================

Problems encountered in installing Yum on centos7 system failure: repodata/ repomd.xml From base: [errno 256] no more mirrors to try. Http:
Mr. original jelly’s column was finally published on June 10, 2018 at 17:50:03, and the number of readers was 45807. However, we found that few people can explain the questions clearly, and many people’s solutions are complex and can’t solve the problems. I checked nearly 20 blogs and articles and compared them, but they basically couldn’t solve the problem.

http://mirrors.ustc.edu.cn/help/centos.html

http://mirrors.163.com/.help/centos.html

https://blog.csdn.net/dreamchasering/article/details/77160477

https://blog.csdn.net/shaoqiufeng/article/details/78785806

https://blog.csdn.net/orangleliu/article/details/40588799

https://www.cnblogs.com/yizhichun/p/6339742.html

https://blog.csdn.net/james_ Jr10/article/details/78357600

https://segmentfault.com/q/1010000000716991/a-1020000000717340

Let’s see how many people ask these questions?But can solve the practical problem is very few!!!

Let me give you the simplest and most effective method. Be patient and watch!

The problem is:

[ root@cit-server6-s1-372 yum.repos .d]# yum makecache
Loaded plugins: fastestmirror
base | 5.6 kB 00:00:00
http://mirrors.163.com/centos/7/os/x86_ 64/repodata/ repomd.xml : [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
Trying other mirror.

One of the configured repositories failed (CentOS-7 – Base – 163.com),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Disable the repository, so yum won’t use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
–enablerepo for temporary usage:

yum-config-manager –disable base

4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager –save –setopt= base.skip_ if_ unavailable=true

failure: repodata/ repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.163.com/centos/7/os/x86_ 64/repodata/ repomd.xml : [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
[ root@cit-server6-s1-372 yum.repos . D] #
the problem of the error:

The main problem lies in the source.

Here’s how to solve the problem:

4. Download the yum dependency package

[ root@localhost ~]# wget http://vault.centos.org/7.2.1511/os/x86_ 64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7. noarch.rpm
–2020-02-09 16:01:35– http://vault.centos.org/7.2.1511/os/x86_ 64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7. noarch.rpm
Resolving host vault.centos.org ( vault.centos.org )… 208.100.23.71
connecting vault.centos.org ( vault.centos.org )|208.100.23.71 |: 80… Connected.
HTTP request issued, waiting for response… 200 OK
length: 30600 (30K) [application/x-rpm]
saving to: “yum-plugin-fastestmirror-1.1.31-34.el7 noarch.rpm ”

100% [= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

2020-02-09 16:01:40 (6.47 KB/s) – saved “yum-plugin-fastestmirror-1.1.31-34.el7.0” noarch.rpm ” [30600/30600])

[ root@localhost ~]# wget http://vault.centos.org/7.2.1511/os/x86_ 64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_ 64.rpm
–2020-02-09 16:01:43– http://vault.centos.org/7.2.1511/os/x86_ 64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_ 64. RPM
parsing host vault.centos.org ( vault.centos.org )… 208.100.23.71
connecting vault.centos.org ( vault.centos.org )|208.100.23.71 |: 80… Connected.
HTTP request issued, waiting for response… 200 OK
length: 28348 (28K) [application/x-rpm]
saving to: yum-metadata-parser-1.1.4-10.el7.x86_ 64.rpm”

100% [= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

2020-02-09 16:01:50 (4.34 KB/s) – saved “yum-metadata-parser-1.1.4-10.el7.x86″_ 64.rpm” [28348/28348])

[ root@localhost ~]# ls
anaconda- ks.cfg initial-setup- ks.cfg yum-plugin-fastestmirror-1.1.31-34.el7. noarch.rpm Template image download desktop
core.8499 yum-metadata-parser-1.1.4-10.el7.x86_ 64.rpm public video document music[ root@localhost ~]# mv yum-* /etc/yum.
yum.conf yum.repos .d/
[ root@localhost ~]# mv yum-* /etc/ yum.repos .d/
[ root@localhost ~]# ls
anaconda- ks.cfg core.8499 initial-setup- ks.cfg Public template video image document download music desktop
0[ root@localhost ~]# cd /etc/ yum.repos .d/
[ root@localhost yum.repos .d]# ls
a Centos-7.repo docker- ce.repo local.repo yum-metadata-parser-1.1.4-10.el7.x86_ 64.rpm yum-plugin-fastestmirror-1.1.31-34.el7. noarch.rpm
[ root@localhost yum.repos .d]# rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_ We will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like you and we will be like like you and we will be like you and we will be like like you and we will we will be like like you and we will we will be like like we will we will we will we will we will be like we will we will we will we will we will we will be like like we will we will we will be like we will we will we will we will be like we will we will we will we will we will be like we will we will we will we will be like we will we will we will we will we will we will be like we will will be like like we will we will we will we will we will we will we will will be like we will we will will will will be like we will we will will will will will ser-1.1.4-10.el7.x86_ 64 has been installed
and[ root@localhost yum.repos .d]# rpm -ivh yum-plugin-fastestmirror-1.1.31-34.el7. noarch.rpm
We are going to be prepared in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in this paper we are going to find you and we are going to find you and we are going to find you and we are going to find you and we are going to find you and we are going to find you and we are going to find you and we are going to find you and we are going to find you and we are going to find you and we are going to find you and we are going to find you and we can we can find you and we can find you and we can find you and we can find you and we can find you and we can find you and we can find you and we can find you and we can find you and we are going to find out in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in preparation in 1.1.31-50.el7.noarch (newer than Yum plugin fastmirror-1.1.31-34.el7.noarch) has been installed
file/usr/lib/Yum plugins/ fastestmirror.py from install of yum-plugin-fastestmirror-1.1.31-34.el7.noarch conflicts with file from package yum-plugin-fastestmirror-1.1.31-50.el7.noarch
file /usr/lib/yum-plugins/ fastestmirror.pyc from install of yum-plugin-fastestmirror-1.1.31-34.el7.noarch conflicts with file from package yum-plugin-fastestmirror-1.1.31-50.el7.noarch
file /usr/lib/yum-plugins/ fastestmirror.pyo from install of yum-plugin-fastestmirror-1.1.31-34.el7.noarch conflicts with file from package yum-plugin-fastestmirror-1.1.31-50.el7.noarch
[ root@localhost yum.repos .d]# ls
a Centos-7.repo docker- ce.repo local.repo yum-metadata-parser-1.1.4-10.el7.x86_ 64.rpm yum-plugin-fastestmirror-1.1.31-34.el7. noarch.rpm
[ root@localhost yum.repos .d]# cd a/
[ root@localhost a]# ls
CentOS- Base.repo CentOS- CR.repo CentOS- Debuginfo.repo CentOS- fasttrack.repo CentOS- Media.repo CentOS- Sources.repo CentOS- Vault.repo
[ root@localhost a]# cp CentOS- Base.repo CentOS- Base.repo.bak
[ root@localhost a]# mv CentOS- Base.repo ../
[ root@localhost a]# cd ../
[ root@localhost yum.repos .d]# ls
a CentOS- Base.repo local.repo yum-plugin-fastestmirror-1.1.31-34.el7. noarch.rpm
Centos-7.repo docker- ce.repo yum-metadata-parser-1.1.4-10.el7.x86_ 64.rpm
[ root@localhost yum.repos .d]# mv /etc/ yum.repos .d/CentOS- Base.repo /etc/ yum.repos .d/CentOS- Base.repo.backup

[ root@localhost yum.repos .d]# yum clean all

[ root@localhost yum.repos .d]# yum makecache

Similar Posts: