Sunday, August 21, 2022

Yum error : Loaded plugins: versionlock

 [opc@dbdemo ~]$ sudo yum install iptables-services

Loaded plugins: versionlock

There are no enabled repos.

 Run "yum repolist all" to see the repos you have.

 To enable custom repositories:

     yum-config-manager --enable <repo>

[opc@dbdemo ~]$

The above is the error getting while issue yum command. My OS is Oracle Linux 7.9

Solution to fix the error:

Login to the server as root

# wget https://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle


# gpg --quiet --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle


# vi /etc/yum.repos.d/ol7-temp.repo


[ol7_latest]

name=Oracle Linux $releasever Latest ($basearch)

baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/latest/$basearch/

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

gpgcheck=1

enabled=1


# yum install oraclelinux-release-el7


# mv /etc/yum.repos.d/ol7-temp.repo /etc/yum.repos.d/ol7-temp.repo.disabled


# yum update -y


Now yum install iptables-services works without any error

References : 

https://yum.oracle.com/faq.html#a10

https://yum.oracle.com/getting-started.html#installing-from-oracle-linux-yum-server


No comments:

Post a Comment