YUM repo errors

Author: | Posted in howto No comments

There are several things that can cause the $SUBJECT. Some errors occur due to incorrect URL entries in /etc/yum.conf or broken repository files, while others are the result of using a faulty plugin or a bad proxy server setting.

However, most common errors come from the use of the (default) caching function. Called http_caching, this option determines how upstream HTTP caches are instructed to handle any HTTP downloads that YUM does (quote from man 5 yum.conf) i.e. it controls what yum caches.

Here comes the ugly part: the default setting is to cache all downloads and that includes repo metadata. If, for some reason the metadata file gets corrupted during download, or it is partially downloaded, yum will not be able to verify the remote availability of packages and it will fail with this error: Metadata file does not match chechsum.

Although there are yum cleaning options that can be run to delete cached files (yum clean all, yum clean metadata) they don’t always work. The solution is to change the default caching behaviour by simply adding http_caching=packages to /etc/yum.conf. This way yum will only cache packages and it will download new repository metadata each time.

Add Your Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.