OCI: Yum Reports Error "Could not resolve host: yum$ociregion.$ocidomain; Unknown error"
Applies To:
Linux OS - Version Oracle Linux 6.0 and later
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Symptoms:
yum fails with the following error:
# yum -y install net-snmp Loaded plugins: versionlock Repository ol7_oci_included is listed more than once in the configuration https://yum$ociregion.$ocidomain/repo/OracleLinux/OL7/MySQL80_community/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum$ociregion.$ocidomain; Unknown error" Trying other mirror.
Cause:
When using a custom image, yum vars that normally reside in /etc/yum/vars/* may not exist. See below example:
# pwd /etc/yum/vars # ls -la total 12 drwxr-xr-x. 2 root root 54 Jan 18 13:08 . drwxr-xr-x. 8 root root 128 Jan 17 19:41 .. -rw-r--r--. 1 root root 20 May 2 06:33 ocidomain -rw-r--r--. 1 root root 14 May 2 06:33 ociregion -rw-r--r--. 1 root root 13 May 2 06:33 region # cat ocidomain oci.oraclecloud.com # cat ociregion .us-ashburn-1 # cat region us-ashburn-1 #
Tagged:
0