Errors

Resolve yum error “retry_no_cache=self._retry_no_cache”

In this article, we’ve resolve yum error retry_no_cache=self._retry_no_cache.

You are trying to convert your CentOS system to CloudLinux, and the conversion process fails with the next messages:

File “/usr/share/yum-plugins/rhnplugin.py”, line 410, in _getFile
start, end, copy_local, checkfunc, text, reget, cache, size)
File “/usr/share/yum-plugins/rhnplugin.py”, line 490, in _noExceptionWrappingGet
retry_no_cache=self._retry_no_cache
AttributeError: ‘RhnRepo’ object has no attribute ‘_retry_no_cache’

In short, the issue is solved in newer yum versions, so you just need to update yum package before the conversion.

But anyway there are few ways to solve the issue directly.

The first method:

  • Disable rhnplugin in /etc/yum/pluginconf.d/rhnplugin.conf (change enabled=1 to enabled=0)
  • Recovery CentOS repos:
    mv /etc/cl-convert-saved/CentOS* /etc/yum.repos.d/
  • Run yum update yum
  • remove CentOS repos:
    mv /etc/yum.repos.d/CentOS* /etc/cl-convert-saved/
  • Enable rhnplugin back by editing the /etc/yum/pluginconf.d/rhnplugin.conf file

The second method:

Use rpm to update required packages:

wget http://repo.cloudlinux.com/cloudlinux/7.4/install/x86_64/Packages/yum-3.4.3-154.el7.cloudlinux.noarch.rpm

wget http://repo.cloudlinux.com/cloudlinux/7.4/install/x86_64/Packages/rpm-4.11.3-25.el7.x86_64.rpm

wget http://repo.cloudlinux.com/cloudlinux/7.4/install/x86_64/Packages/rpm-python-4.11.3-25.el7.x86_64.rpm

wget http://repo.cloudlinux.com/cloudlinux/7.4/install/x86_64/Packages/rpm-libs-4.11.3-25.el7.x86_64.rpm

wget http://repo.cloudlinux.com/cloudlinux/7.4/install/x86_64/Packages/rpm-build-libs-4.11.3-25.el7.x86_64.rpm

wget http://mirror.centos.org/centos/7/os/x86_64/Packages/rpm-build-4.11.3-25.el7.x86_64.rpm

wget http://repo.cloudlinux.com/cloudlinux/7.4/install/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm

and then:

rpm -Uv rpm-4.11.3-25.el7.x86_64.rpm rpm-libs-4.11.3-25.el7.x86_64.rpm rpm-python-4.11.3-25.el7.x86_64.rpm yum-3.4.3-154.el7.cloudlinux.noarch.rpm rpm-build-4.11.3-25.el7.x86_64.rpm rpm-build-libs-4.11.3-25.el7.x86_64.rpm python-urlgrabber-3.10-8.el7.noarch.rpm

Today, we’ve learned how our Support Engineers solve yum error retry_no_cache=self._retry_no_cache.

[Need assistance to fix this error or install tools? We’ll help you.]

Related Articles