Yum issue

Latest response

Hi there:
I installed RHEL Enterprise version 8.1 last week, and it worked fine.

I am installing Oracle 11GR2.

In order to install Oracle 11GR2, I have to run rpm to install some packages and in order to set xterm*, xorg*, xclock and xauth i ran the following command:[root@localhost ~]# yum -y install xterm* xorg* xclock xauth

and received the following.
Updating Subscription Management repositories.
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
[root@localhost ~]#
..................................................
I have checked the date and time as suggested by one memo as follows and it is set properly:

[root@localhost ~]# date
Mon Mar 30 16:45:20 EDT 2020
[root@localhost ~]#
.......................................................
Yum update gives me the following:

[root@localhost ~]# yum update
Updating Subscription Management repositories.
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
[root@localhost ~]#
.............................................................
Yum repolist gives me the following output:

[root@localhost ~]# yum repolist
Updating Subscription Management repositories.
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
No repositories available
[root@localhost ~]#
...............................................................
Force ReRegistration provides me the following:-

[root@localhost ~]# subscription-manager register --force
Unregistering from: subscription.rhsm.redhat.com:443/subscription
The system with UUID 09683cf6-62a5-4b2f-8aa0-45d4cb24a87c has been unregistered
All local data removed
Registering to: subscription.rhsm.redhat.com:443/subscription

[root@localhost ~]# subscription-manager register --force
Username: blf2vkr
Password:
The system has been registered with ID: 77865d01-73b5-45c5-b3a5-074c92c597db
The registered system name is: localhost.localdomain

......................................................
PLEASE GUIDE WHAT TO DO. My two Email Addresses are: riyazm@gmail.com
blf2vkr@gmail.com

REGARDS AND THAKS IN ADVANCE.

blf2vkr

Responses

Hi Muhammad Riyaz,

It seems that your system has got registered, however, no subscriptions are attached yet. If this is the case run the command:

# subscription-manager attach --auto

Once done, review the status using the command " # subscription-manager status" and it should be "current". If still not working then do a complete clean up of subscriptions from your system and re-register it. Run the below commands in the same order:

# subscription-manager remove --all
# subscription-manager unregister
# subscription-manager clean
# yum clean all
# rm -rf /var/cache/yum/*
# subscription-manager register
# subscription-manager attach --auto

Once this is done, verify the subscription status and checkout the populate the repository:

# subscription-manager status
# yum repolist

I hope this helps. All the best!

Thanks, my issue is resolved.

Hi Muhammad,

What Sadashiva wrote is correct, there is no subscription attached and the command he provided solves it in most of the cases.
If you have more than one subscription, it may fail (by attaching a wrong subscription) though. Let me add an alternative way. :)

Check for the Pool ID of the matching subscription : sudo subscription-manager list --available
Attach the subscription by executing this command : sudo subscription-manager attach --pool=<Pool ID>

Regards,
Christian

Hi Christian,

I tried that again conflicting outputs:

sudo subscription-manager list --consumed No consumed subscription pools were found.

[root@localhost ~]# sudo subscription-manager list --available This system is not yet registered. Try 'subscription-manager register --help' for more information.

However when try from GUI it says already registered, but again out of that page says not register.

Could you or someone please confirm if it works fine on VIrtual Machine? I remember did it in past

Hi Apni,

This seems to be a response to the new thread you've created ... so, let's continue there. :)
And yes, it works on virtual machines right as it works on physical machines, no difference.

Regards,
Christian

how we can register in rhel 8.2