yum fails with [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>

Solution Verified - Updated -

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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.