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= metalink= 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= metalink= 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= metalink= failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck=1 

Our company repo:

[mmp] name=MMP baseurl= gpgcheck=0 enabled=1 

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

6

3 Answers

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 then try accessing it as following to verify the access. Please check all the URLs

# curl -v

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

This seems to be a problem with the EPEL repository. Try yum with

--disablerepo=epel\* 

until they get this fixed.

if you don't have an immediate need to get packages from EPEL, use yum with

--disablerepo=epel 

until your local mirror syncs. yum clean all may or may not help, depending on which mirror you hit.

My general suggestion is still valid, though -- unless you have an immediate need to get EPEL packages, I would suggest using

--disablerepo=epel 

until your local mirror gets the fixed repodata. If you do have an immediate need for EPEL packages and

 yum clean all 

does not help, you will need to adjust your config to point to some specific mirror that has the fixed content, like by adding baseurl=

$basearch to epel.repo. Most mirrors should be updated by now, though.


Alternatives >>>

I happened to be on Freenode channel #epel when someone complained about this issue, but if this had happened to me, I could have enabled one repository at a time (with --disablerepo=* and --enablerepo=somerepo) to find which repo caused the trouble.

skip_if_unavailable=1 for non-critical repos sounds like a good idea.

Many people need only a few packages from EPEL. One option would be to import the EPEL packages you need to some locally controlled repository and use that instead. createrepo is related to this. Top

1

Check your network connectivity. If you can't see your system ip address, then you should check & make network connectivity properly.

I faced this issue. I used CentOS 7 in VM ware. If I execute "ifconfig" command, it will show one IP address only. But generally in VM ware it should show two ip addresses. So if you can see only one IP address, then shutdown your linux system. Then change your Network Settings (Network Adapter) in VM ware.

Try this, it will work...!

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like