yum fails with [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>
Issue
- yum command fails with following error,
# yum repolist
Loaded plugins: rhnplugin, security
http://local/path/to/yum/repository/repomd.xml: [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: myrepo. Please verify its path and try again
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 5
- Red Hat Network (RHN)
- Red Hat Satellite
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.