Yum fails with an error "Unable to detect release version (use '--releasever' to specify release version)"
Issue
- yum command fails with the following error:-
# yum clean all
Unable to detect release version (use '--releasever' to specify release version)
Updating Subscription Management repositories.
0 files removed
# yum search tree
Unable to detect release version (use '--releasever' to specify release version)
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 5.4 B/s | 10 B 00:01
Errors during downloading metadata for repository 'rhel-8-for-x86_64-baseos-rpms':
- Status code: 404 for https://cdn.redhat.com/content/dist/rhel8/$releasever/x86_64/baseos/os/repodata/repomd.xml
Error: Failed to download metadata for repo 'rhel-8-for-x86_64-baseos-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Environment
- Red Hat Enterprise Linux
- Red Hat Subscription Manager(RHSM)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.