There are no enabled repositories RHEL solution

Solution for the “There are no enabled repositories RHEL solution” error

In this tutorial, we will show you the reason and the solution for the there are no enabled repositories RHEL solution error. This occurs when you have not enabled your RHEL subscription.

You might come across the error like this:

Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d",  "/etc/distro.repos.d"

How To Fix there are no enabled repositories RHEL solution error

In this tutorial, we will take you through the step-by-step instructions to fix the “There are no enabled repositories RHEL solution” error. In order to solve this, you need to

  • Register your RHEL subscription
  • Enable the package manager

How to enable Red Hat repositories with subscription-manager command

 

At first, you need to have paid or trial Redhat subscription available so that you can enable repos and install the software.

# subscription-manager register

There is also another option where you don’t need to have any subscription but you should mount your ISO image of RedHat and make it your local repository with the following command/

# mkdir /media/rhel-iso
# mount /dev/cdrom /media/rhel-iso/

Now you need to create a new dnf repo file at /etc/yum.repos.d/RHEL_Disc.repo with the following content:

[RHEL_Disc]
name=rhel-8.4-x86_64-dvd
baseurl="file:///media/rhel-iso/AppStream/"
gpgcheck=0

Now you can check for new repos to enable this repository:

# dnf repolist

Now, you can easily install any software from repos without going through any issues.

 

READ More Relevant Stuff:  How To Install OpenCV On CentOS 8

Leave a Reply

Your email address will not be published. Required fields are marked *