yum error: failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try. Solutions and yum installation issues

yum error: failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try. Solutions and issues about reinstalling yum and python in Centos7.5 1804

  • Zero. Preface
  • 1. yum error: failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try. Solution
      • Screenshot of the problem: ![Insert picture description here](https://img-blog.csdnimg.cn/8131a4764a43413a818e6f12ca481c41.png#pic_center)
      • Solution steps:
        • 1. Delete the old warehouse
        • 2. Uninstall the yum package
        • uninstall
        • Uninstall components
        • There is no more query
      • 3. Download the latest rpm package
      • 4. Reinstall yum (there is a pitfall in installing yum)
        • First install `yum-metadata-parser-1.1.4-10.el7.x86_64.rpm`
        • Secondly install `yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm` and `yum-3.4.3-168.el7.centos.noarch.rpm`
        • Check whether yum is installed correctly
      • 5.Import certificate
      • 6. Set up Ali source
      • 7. Clear the cache and generate a new cache
  • 2. Regarding the issue of reinstalling yum and python on Centos7.5 1804
      • 20201118 update:
        • 1. Post a huge pitfall problem when installing yum. When installing yum,
        • 2. Uninstall python and yum
          • 1. Uninstall existing Python and forcefully delete installed programs and their associations:
          • 2. Forcefully delete all remaining Python files:
          • 3. Uninstall existing yum:
          • 4. Forcefully delete all remaining files:
          • 5. Check CentOS 7 kernel version: `cat /etc/centos-release`.
          • 6. Find the corresponding file download and find the corresponding dependency download at [http://vault.centos.org](http://vault.centos.org).
          • 7. Batch installation method:
          • 8. Complete the test
  • 3. Solve failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try
    • question:
    • 1. When installing kubelet, run the command:
      • The following prompts and errors appear:
      • translate:
    • 2. Solution: The main reason for this problem is that there is a problem with Alibaba’s domestic yum source. It should be that the file path has been changed or upgraded, or the original file no longer exists; the prompt provides 1-5 solutions.
  • 4. Troubleshooting that the yum source cannot be used in Linux — network yum configuration
    • question:
      • Error display:
      • The problem of being unable to use the YUM source is as follows:
    • Solution:
      • 1.# Clear the original YUM and related software packages of RHEL
      • 2.# Software package download address
      • Download related software packages for centos7
      • Install packages
    • Problems encountered during installation
      • Question 1
        • Error: Dependency detection failed:
        • Solution: Upgrade the rpm. You have already downloaded it in the previous step. Upgrade directly.
      • Problem solved, continue installation
        • Download the configuration file and edit it
        • View command:
        • Delete the x86_64 directory under /var/cache/yum/
        • Clean yum cache: `yum clean all`
        • Cache server software package information locally to improve search and installation efficiency: `yum makecache`
        • test:

Zero. Preface

The author’s method may not be the best, but it can solve the problem. If you have a better solution, please leave a message, private message or add a V

In order to save readers’ time, the author recommends reading only 1. Yum error: failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try. Solution, of course, it is only a recommendation. How to read it is up to the readers themselves.

1. yum error: failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try. Solution

Screenshot of the problem:

Solution steps:

1. Delete old warehouse
rm -rf /etc/yum.repos.d/*
2. Uninstall the yum package

Check the installed version first

rpm -qa yum
Uninstall
rpm -qa yum yum-3.4.3-150.el7.centos.noarch
Uninstall components
rpm -qa | grep yum | xargs rpm -e --nodeps
No more available in query
rpm -qa yum

3. Download the latest rpm package

Download address: http://mirrors.163.com/centos/7/os/x86_64/Packages/
Download these three:

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm

4. Reinstall yum (there is a pitfall in installing yum)

First install yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
[root@localhost bak]# rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm Preparing... ################ ################# [100%]
Updating/installing...
   1:yum-metadata-parser-1.1.4-10.el7 ################################[100 %]

Secondly install yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm and yum-3.4.3-168.el7.centos.noarch.rpm
[root@localhost bak]# rpm -ivh yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm yum-3.4.3-168.el7.centos.noarch.rpm
Preparing... ################################# [100%]
Updating/installing...
   1:yum-3.4.3-168.el7.centos ################################ [ 50%]
   2:yum-plugin-fastestmirror-1.1.31-5################################[100%]

It will appear if you do not install it at the same time

[root@localhost bak]# rpm -ivh yum-3.4.3-168.el7.centos.noarch.rpm
error: Failed dependencies:
        yum-plugin-fastestmirror is needed by yum-3.4.3-168.el7.centos.noarch

Then install yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm first, and then you will find

[root@bigdata111 yum]# rpm -ivh yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
error: Failed dependencies:
    yum >= 3.0 is needed by yum-plugin-fastestmirror-1.1.31-45.el7.noarch

This means that installing the yum3.4 rpm requires yum-plugin-fastestmirror. This is basically a chicken-and-egg problem. There is no solution!

Check whether yum is installed correctly
rpm -qa yum

5.Import certificate

rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7

If it prompts that the network connection failed, you can download it yourself and then import it from the path.

6. Set up Ali source

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

7. Clear the cache and generate a new cache

yum clean all
yum makecache

Wait for the command to complete and then rewrite the installation.

2. Regarding the issue of reinstalling yum and python on Centos7.5 1804

20201118 update:

1. Post a huge pitfall when installing yum,
[root@bigdata111 yum]# rpm -ivh yum-3.4.3-158.el7.centos.noarch.rpm
error: Failed dependencies:
    rpm-python is needed by yum-3.4.3-158.el7.centos.noarch
    yum-plugin-fastestmirror is needed by yum-3.4.3-158.el7.centos.noarch

What this means is that if you install yum 3.3.4, you need to install the two dependencies rpm-python and yum-plugin-fastestmirror.

[Note]: When choosing two versions, I used the relevant lower version. My Centos7.5 1804

The following can be installed [separately]

[root@bigdata111 yum]# rpm -ivh rpm-python-4.11.3-32.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating/installing...
   1:rpm-python-4.11.3-32.el7 ################################ [100%]
[root@bigdata111 yum]# rpm -ivh yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
error: Failed dependencies:
    yum >= 3.0 is needed by yum-plugin-fastestmirror-1.1.31-45.el7.noarch

This means that the installation of yum-plugin requires the installation of yum >= 3.0 or yum3.0 or above.

[root@bigdata111 yum]# rpm -ivh yum-3.4.3-158.el7.centos.noarch.rpm
error: Failed dependencies:
    yum-plugin-fastestmirror is needed by yum-3.4.3-158.el7.centos.noarch

This means that installing the yum3.4 rpm requires yum-plugin-fastestmirror. This is basically a chicken-and-egg problem. There is no solution!

Later I found out that I need to install both together!!!

[root@bigdata111 yum]# rpm -ivh yum-3.4.3-158.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
Preparing... ################################# [100%]
Updating/installing...
   1:yum-plugin-fastestmirror-1.1.31-4################################[ 50%]
   2:yum-3.4.3-158.el7.centos ################################ [100%]

That’s it! If you can’t install it individually, you can install it together… Big pit, okay. I’ll try to reinstall python2.7 again.

2. Uninstall python and yum
1. Uninstall existing Python and forcefully delete installed programs and their associations:
rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps
2. Forcefully delete all remaining Python files:
whereis python| xargs rm -frv
3. Uninstall existing yum:
rpm -qa| grep yum| xarg
4. Forced deletion of all remaining files:
whereis yum| xargs rm -frv
5. Check CentOS 7 kernel version: cat /etc/centos-release.
6. Find the corresponding file download and find the corresponding dependency download at http://vault.centos.org.

Note: The address under the original Tsinghua mirror source https://mirrors.tuna.tsinghua.edu.cn/centos/7.5.1804/ has been changed. There is only one readme file, so the path is changed to the following address:

Full path to my CentOS7 version: https://vault.centos.org/7.5.1804/os/x86_64/Packages/

Execute the following command directly in the Centos command line

wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-2.7.5-68.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-backports-1.0-8.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-chardet-2.2.1-1.el7_1.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-devel-2.7.5-68.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-ipaddress-1.0.16-2.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-libs-2.7.5-68.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-pycurl-7.19.0-19.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-setuptools-0.9.8-7.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/python-virtualenv-15.1.0-2.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/rpm-4.11.3-32.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/rpm-build-4.11.3-32.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/rpm-build-libs-4.11.3-32.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/rpm-libs-4.11.3-32.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/rpm-python-4.11.3-32.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/rpm-sign-4.11.3-32.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-plugin-aliases-1.1.31-45.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-plugin-protectbase-1.1.31-45.el7.noarch.rpm
wget https://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-utils-1.1.31-45.el7.noarch.rpm
7. Batch installation method:
rpm -Uvh --replacepkgs python*.rpm

rpm -Uvh --replacepkgs rpm-python*.rpm yum*.rpm rpm-*.rpm

After the download is complete, install these packages. You may have to resolve some dependencies yourself:

rpm -Uvh --replacepkgs *.rpm

Note that whether it is a single installation or batch installation, if there is a problem with installation dependencies, copy the dependencies reported in the error and download them at http://vault.centos.org/7.7.11988/os/x86_64/Packages/ (combined with your actual Search for dependency packages on the CentOS7 version address), download them to the CentOS 7 machine, and install the dependency packages that report errors.

8. Complete the test

Enter the commands yum and python -V

3. Solve failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try

Question:

failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try.
https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for kubernetes

translate:

Failed: repodata/repomd. xml from kubernetes: [Errno 256] No more images to try.
https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml:[Errno-1] report. Unable to verify xml signature for kubernetes

1 When installing kubelet, run the command:

yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

The following prompts and errors appear:

One of the configured repositories failed (Kubernetes),
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:

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

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).

Run the command with the repository temporarily disabled
yum --disablerepo=kubernetes …

Disable the repository permanently, 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 kubernetes
or
subscription-manager repos --disable=kubernetes

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 much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=kubernetes.skip_if_unavailable=true
failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try.
https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for kubernetes

Translation:

One of the configured repositories failed (Kubernetes),
And yum doesn’t have enough cached data to continue. At this time, the only
The safe thing to do with Yum is fail. There are several ways to solve this problem:

1. Contact the upstream repository and let them resolve the issue.
2. Reconfigure baseurl/etc. For a repository, point to a job
upstream if you are using a newer
The distribution versions supported by the repository (and
Packages from the previous release are still valid).
3. Run the command with the repository temporarily disabled
yum-disablerepo=kubernetes. .
4. Disable the repository permanently so yum won’t use it by default. Yum
The repository will then be ignored until you enable it permanently
Use again or temporarily using –enablerepo:
yum-config-manager –disable kubernetes
or
subscription-manager repos –disable=kubernetes

5. If the failed repository is not available, configure it to be skipped.
Please note that yum will try to contact the repo. When it runs most commands,
So you have to try and fail every time (so .yum will be very successful
slower). If this is a very temporary problem, this is usually a good
compromise:
yum-config-manager –save –setopt=kubernetes.skip_if_unavailable=true

Failure: repodata/repomd. xml from kubernetes: [Errno 256] No more images to try.
https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml:[Errno-1] report. Unable to verify xml signature for kubernetes

Second solution: The main reason for this problem is that there is a problem with Alibaba’s domestic yum source. It should be that the file path has been changed or upgraded, or the original file no longer exists; the prompt provides 1-5 solutions,

At this time, you only need to modify the gpgcheck and repo_gpgcheck parameters of /etc/yum.repos.d/kubernetes.repo to change the requirements to 0. See below:

cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
exclude=kubelet kubeadm kubectl
EOF

In this way, run yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes again
, you can install kubelet.

4. Troubleshooting that the yum source cannot be used in Linux – network yum configuration

Question:

Error reporting problem display:

[root@NISEC-6601 yum]# yum clean all

bash: yum: command not found...

or

The problem of being unable to use the YUM source is as follows:

[root@localhost ~]# yum repolist

Plugins loaded: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

repolist: 0

[root@localhost ~]#

[root@localhost ~]#

[root@localhost ~]# yum install ntp

Plugins loaded: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

There are no enabled repos.

 Run "yum repolist all" to see the repos you have.

 To enable Red Hat Subscription Management repositories:

     subscription-manager repos --enable <repo>

 To enable custom repositories:

     yum-config-manager --enable <repo>

Solution:

1.# Clear the original YUM and related software packages of RHEL

rpm -qa|grep yum|xargs rpm -e --nodeps

rpm -qa|grep python-urlgrabber|xargs rpm -e --nodeps

2.# Software package download address

# https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/

# http://mirrors.163.com/centos/7/os/x86_64/Packages/

Download centos7 related software packages

http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-4.11.3-45.el7.x86_64.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-10.el7.noarch.rpm

Upload the software package to the rhel7.3 system

Install software package

Note: yum-plugin-fastestmirror and yum two rpm must be installed together and cannot be separated.

rpm -ivh python-iniparse-0.4-9.el7.noarch.rpm

rpm -ivh python-urlgrabber-3.10-10.el7.noarch.rpm

rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

rpm -ivh yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm yum-3.4.3-168.el7.centos.noarch.rpm

Problems encountered during the installation process

Question 1

Error: Dependency detection failed:
rpm >= 0:4.11.3-22 required by yum-3.4.3-158.el7.centos.noarch

yum >= 3.0 is required by yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch
Solution: Upgrade rpm, you have downloaded it in the previous step, upgrade directly
rpm -Uvh rpm-4.11.3-45.el7.x86_64.rpm --nodeps

The problem is solved, continue the installation

Download configuration file and edit
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

vi CentOS-Base.repo //Edit file

Change all $releasever in the file to 7, leaving $basearch unchanged.

Then upload and copy this configuration file to the /etc/yum.repos.d/ path and delete the redhat.repo file

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

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

CentOS-Base.repo redhat.repo

[root@localhost yum.repos.d]# rm redhat.repo

rm: Delete the normal file "redhat.repo"? y

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

CentOS-Base.repo

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

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

Glossary:

1.$releasever

The value of $releasever, the release version of the current system. Refers to major version 7

2.$basearch

The value of $basearch, system hardware architecture (CPU instruction set)

View command:

arch, the result is x86_64

Delete the x86_64 directory under /var/cache/yum/
[root@localhost yum.repos.d]# cd /var/cache/yum/

[root@localhost yum]# ls

x86_64

[root@localhost yum]# rm -rf x86_64

[root@localhost yum]# ls
Clean yum cache: yum clean all
Cache server software package information locally to improve search and installation efficiency: yum makecache
Test:

If the software package information can be searched, the configuration is complete:

yum search vim

Execute yum repolist to check. If the repo warehouse list is displayed and the number of software packages is displayed, it is OK. (Or use yum makecache):

yum repolist

Use yum to install the package for testing:

yum -y install vim

el

yum error: failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try. Solution

glow stick

yum error: failure: repodata/repomd.xml from xxxxxx: [Errno 256] No more mirrors to try. Solution

khaki summer

Regarding the issue of reinstalling yum and python on Centos7.5 1804

Shenzhou Yongtai

Solve failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try

Ultraman’s No. 1 Egg

Troubleshooting that the yum source cannot be used in Linux – network yum configuration