You may receive a
There are no enabled repos error message when trying to install system updates on a fresh Red Hat Linux install. This occurs when you have not enabled your RHEL subscription. In this tutorial, we will take you through the step by step instructions to register your RHEL subscription, enable the package manager, and finally install updates and remedy the error message for good.
In this tutorial you will learn:
- How to enable Red Hat repositories with
- How to use a Red Hat ISO as a software repository
|Category||Requirements, Conventions or Software Version Used|
|System||Red Hat Linux|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
There are no enabled repositories RHEL solution
The error message below will be display on your Red Hat Linux system after a fresh installation. It simply means that in order to get system updates and also to install new software you need to configure package repositories.
Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d"
One way to remedy this issue, as well as the most obvious way, is to use
subscription-manager and follow the instructions to register your RHEL system and thus also enable RHEL’s repos. For this you well need to have paid or trial Redhat subscription available.
# subscription-manager register
However, if you simply want to play around and install software without the need for an up to date Red Hat subscription, you can mount your downloaded Red Hat ISO image and make it your default local repository and be able to install software. To enable your local repository and thus overcome the
There are no enabled repos error, first mount your RHEL iso image:
# mkdir /media/rhel-iso # mount /dev/cdrom /media/rhel-iso/
Now when you have your RHEL iso mounted in
/media/rhel-iso/, create a new dnf repo file at
/etc/yum.repos.d/RHEL_Disc.repo with the following content:
[RHEL_Disc] name=rhel-8.5-x86_64-dvd baseurl="file:///media/rhel-iso/AppStream/" gpgcheck=0
Once ready check for new repos to enable this repository:
# dnf repolist
Now you will be able to install new software on your unregistered RHEL Linux box. As you can see below, we are able to install an example package via the RHEL disc repo that we created.
The disadvantage is that you will not receive any new updates and this can create a security problem for your system. Furthermore, when using the
dnf command the following message will continue to persist.
This system is not registered with an entitlement server. You can use subscription-manager to register.
In this tutorial, you saw how to enable installation repositories on a Red Hat Linux system. Since Red Hat requires that users register either a paid or trial subscription, we need to use the
subscription-manager command to enable repositories. Alternatively, you saw how to use the installation disc to act as a repository. This should only be seen as a temporary solution or one to use in test scenarios. Ultimately, you will need to sign up for a Red Hat account and register your system.