Yum command fails with- "Curl error (37): Couldn't read a file" - "Issue while fetching content using Custom or third party repositories"
Issue
- System is properly registered and subscribed with an Active Red Hat Subscription but still the Yum command fails with below error:-
# yum repolist -v
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, subscription-manager, uploadprofile
Updating Subscription Management repositories.
YUM version: 4.7.0
cachedir: /var/cache/dnf
Red Hat Enterprise Linux 8 for x86_64 - AppStre 2.6 MB/s | 57 MB 00:21
Red Hat Enterprise Linux 8 for x86_64 - BaseOS 4.7 MB/s | 60 MB 00:12
LocalRepository_BaseOS 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository 'LocalRepo_BaseOS':
- Curl error (37): Couldn't read a file:// file for file:///mnt/BaseOS/repodata/repomd.xml [Couldn't open file /mnt/BaseOS/repodata/repomd.xml]
Error: Failed to download metadata for repo 'LocalRepo_BaseOS': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Subscription Management
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.