-->
  • Recent Articles

    Yum Command Failing With Error "Could not resolve host: yum.$ocidomain; Name or service not known"

     I got this error , while trying to install a package. The error says "https://yum.$ocidomain/repo/OracleLinux/OL7/addons/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.$ocidomain; Name or service not known"

    Trying other mirror.". 

    Could not resolve host: yum.$ocidomain
    Could not resolve host: yum.$ocidomain


    There are coule of workarround for this issue:

    Workarround 1:


    • Check the content of /etc/yum/vars/ociregion
    # cat /etc/yum/vars/ociregion
    • Make this file empty "/etc/yum/vars/ociregion" If you have a "-" in that file, which should not be there, empty the file with th commands below
    # > /etc/yum/vars/ociregion
    • Test the yum command again to make sure it works.

    Workarround 2:


    Please create these three files and Manually make an entry for Region,domain in them. Please replace region with your values.

    #echo oracle.com > /etc/yum/vars/ocidomain
    #echo us-ashburn-1 > /etc/yum/vars/region
    #echo -us-ashburn-1 > /etc/yum/vars/ociregion

    yum Domain and region entry
    yum Domain and region entry

    No comments