How to Fix “Failed to set locale, defaulting to C.UTF-8” in CentOS 8

Have you ever encountered the warning/error “Failed to set locale, defaulting to C.UTF-8” in CentOS 8 or RHEL 8? If yes, then this article describes how to fix this error. Note that this article…