Fix : there are no enabled repositories in “/etc/yum.repos.d”, “/etc/yum/repos.d”, “/etc/distro.repos.d” Error

Fix “There are no enabled repositories RHEL solution” error or Fix : there are no enabled repositories in “/etc/yum.repos.d”, “/etc/yum/repos.d”, “/etc/distro.repos.d” Error

You will come across this error while installing a software  when you don’t not enabled your RHEL subscription. So one and only solution is to enable RHEL subscription.

Solution for the:

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 in “/etc/yum.repos.d”, “/etc/yum/repos.d”, “/etc/distro.repos.d” Error

In this tutorial, we will take you through the step-by-step guide to fix the Fix “There are no enabled repositories RHEL solution” error or Fix : there are no enabled repositories in “/etc/yum.repos.d”, “/etc/yum/repos.d”, “/etc/distro.repos.d” Error

How To Fix there are no enabled repositories RHEL solution error

Register your RHEL subscription and enable the package manager

How to enable Red Hat repositories with subscription-manager command

Make sure you have paid or trial Redhat subscription in your RHEL.

# subscription-manager register

 

How to enable Red Hat repositories without RHEL subscription

Don’t worry if you don’t have RHEL subscription. We have another method where you can mount the 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 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 run the following command to  check for new repos to enable this repository:

# dnf repolist

Now, you can easily install any software from repos without going having any error in RHEL.

 

Leave a Comment