All Yum mirrors failing with [Errno -1] repomd.xml does not match metalink

Solution 1:

It looks like the repomd.xml file hosted by the various mirrors has a newer timestamp than expected, given by the metalink URL:

For example, https://mirror.vcu.edu/pub/gnu_linux/epel/7/x86_64/repodata/repomd.xml returns:

<repomd>
  <revision>1591901338</revision>
  <!-- ... -->
</repomd>

While the metalink server tells Yum to expect:

<?xml version="1.0" encoding="utf-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Sat, 13 Jun 2020 05:58:42 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">
 <files>
  <file name="repomd.xml">
   <mm0:timestamp>1591551753</mm0:timestamp>
   <size>4851</size>
   <verification>
    <hash type="md5">34f2c5f5ac44cf223d5342364e2e9434</hash>
    <hash type="sha1">125df2220c97167ba37d86a71ac9468823231a94</hash>
    <hash type="sha256">801b295225be7b3f0c9f513093dfb0d374d85222a0f2d8324c97a0406b2ce6f1</hash>
    <hash type="sha512">50c451ab1918815e46266bd351aad6878dffd5b2c9ae31f94dad37de30a1224ad2e91b1790a0d416ad320091b0e4b989d4a18ff462c4d9913dea09bae0c53da4</hash>
   </verification>
   <!-- ... -->
  </file>
 </files>
</metalink>

The metalink timestamp 1591551753 < 1591901338 revision in the repomd file.

As a workaround, you can comment the metalink property in /etc/yum.repos.d/epel.repo and uncomment the baseurl. But this may have a negative impact on the mirror infrastructure and loses the security benefits of the metalink data; not something you want to run long-term.

Checking back several hours later, the metalink data has been updated with both revisions, which should correct the problem:

<?xml version="1.0" encoding="utf-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Sat, 13 Jun 2020 15:07:38 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">
 <files>
  <file name="repomd.xml">
   <mm0:timestamp>1591901393</mm0:timestamp>
   <size>5479</size>
   <verification>
    <hash type="md5">2f97fb4bae338fc659fb6c83fc0b4016</hash>
    <hash type="sha1">fbd5de037e5d8a77b7cf79d07c85fc7d54bc9892</hash>
    <hash type="sha256">db54f459b84db16d3385d94b6b59e22d71866d49b92b3e94318d3afb4fdd398b</hash>
    <hash type="sha512">557754859938ec9e772cceb549c99bfeb9a44296ee2811f58e3ae4ae7853cac207f754f02c6a1af87cc62b6680900e7d5c3542dc7539b1c58fe90b06805cc05a</hash>
   </verification>
   <mm0:alternates>
    <mm0:alternate>
      <mm0:timestamp>1591551753</mm0:timestamp>
      <size>4851</size>
      <verification>
       <hash type="md5">34f2c5f5ac44cf223d5342364e2e9434</hash>
       <hash type="sha1">125df2220c97167ba37d86a71ac9468823231a94</hash>
       <hash type="sha256">801b295225be7b3f0c9f513093dfb0d374d85222a0f2d8324c97a0406b2ce6f1</hash>
       <hash type="sha512">50c451ab1918815e46266bd351aad6878dffd5b2c9ae31f94dad37de30a1224ad2e91b1790a0d416ad320091b0e4b989d4a18ff462c4d9913dea09bae0c53da4</hash>
      </verification>
    </mm0:alternate>
   </mm0:alternates>
   <!-- ... -->
  </file>
 </files>
</metalink>

Solution 2:

yum makecache  fast

Will refresh your mirrors so that you get valid install sources.

Tags:

Yum

Centos