Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

centos

yum

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?

like image 888
bluethundr Avatar asked Feb 14 '20 22:02

bluethundr


People also ask

Why yum is not working?

The easy fix is to change the value on the enabled line to 1, then run yum update to refresh the package list and install the software you need. Individual packages can also be excluded from updates. These are configured in the /etc/yum. conf file, look for a line that starts with exclude.

What does yum make cache do?

makecache Is used to download and make usable all the metadata for the currently enabled yum repos.

Why is Yum not working?

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: 1. Contact the upstream for the repository and get them to fix the problem.

What is wrong with Yum makecache?

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.

Is it safe to use YUM for failing repositories?

One of the configured repositories failed (HDP-2.6-repo-1), 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: 1.

Is it safe to use YUM to clean all files?

I've done clean all, rebooted, clean all again, etc., etc. and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail.


2 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 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

like image 65
Vendetta Avatar answered Jan 03 '23 20:01

Vendetta


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

like image 42
Srinivasan Avatar answered Jan 03 '23 18:01

Srinivasan