OCI: Yum Reports Error "Could not resolve host: yum$ociregion.$ocidomain; Unknown error"
When trying to install packages on an Oracle Cloud Instance running a custom Oracle Linux image, 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.
This error can occur when using a custom image, as some yum variables that normally reside in /etc/yum/vars/*
on a standard Oracle Linux OCI image may not exist, such as in the following example:
Tagged:
1