centosyum

yum doesn't have enough cached data to continue. At this point the only\n safe thing yum can do is fail


We use custom yum repos at our company. Something is causing them to fail the yum makecache command.

I'm on CentOS Linux release 7.7.1908 (Core).

Here's the error that we get when we run yum makecache:

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

The repos look like this and I need to use both of them.

Epel repo:

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

Our company repo:

[mmp]
name=MMP
baseurl=http://10.245.19.168/mmp_repo/
gpgcheck=0
enabled=1

I'm not sure what the problem is. How can I make this error go away?


Solution

  • This question is solved here. So, first, some background: When yum installs a package, it unpacks and moves all of the files to the proper directory (i.e. opt, bin, etc etcetera). When a network connection is interrupted, a drive-write is stopped, what have you, during the install process, some files might not be written, while the program still returns that it was installed successfully.

    To fix this:

    On the host where the installation is failing, check if the repos are correct.

    Especially the baseurl

    # grep 'baseurl' /etc/yum.repos.d/* | grep HDP

    Just append "/repodata/repomd.xml" in the URL and then test if it is accessible.

    Example: if baseurl is http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0 then try accessing it as following to verify the access. Please check all the URLs

    # curl -v http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0/repodata/repomd.xml

    If the URLs are accessible then in that case try cleaning the yum cache by running the command.

    # yum clean all

    After yum clean try running the following command again to verify if the issue persist.

    # yum -y install ranger_2_6_3_0_235-admin