bluethundr
bluethundr

Reputation: 1325

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?

Upvotes: 15

Views: 78495

Answers (5)

Fashion Mafia
Fashion Mafia

Reputation: 1

In my case, dns was failing, recorrected DNS fixed it

Upvotes: 0

Jithin U. Ahmed
Jithin U. Ahmed

Reputation: 1801

This error occurs because CentOS 7 repositories on the official mirror may have been deprecated or moved due to CentOS 7 reaching the end of life (EOL). Here’s how you can resolve it:

CentOS maintains older versions in the vault repository after EOL. Update the repository file to use the vault URLs:

Edit the base repository file:

sudo vi /etc/yum.repos.d/CentOS-Base.repo

Replace mirror.centos.org URLs with vault.centos.org. For example:

baseurl=http://vault.centos.org/7.9.2009/os/x86_64/

Ensure you update all sections (e.g., [base], [updates], [extras]).

Clear the cached metadata to ensure it fetches the new metadata:

sudo yum clean all
sudo yum makecache

Retry your previous yum command to see if it resolves the issue:

sudo yum update

Upvotes: 0

Srinivasan
Srinivasan

Reputation: 11

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

Upvotes: 1

Thoth
Thoth

Reputation: 2276

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

Upvotes: 1

Boaventura
Boaventura

Reputation: 1409

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=http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/epel/7/

$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

Upvotes: 2

Related Questions