If a CentOS system returns the message
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
try the following (possibly replacing the locale en_US with the appropriate one):
echo 'LANG=en_US.utf-8' | sudo tee -a /etc/environment > /dev/null
echo 'LC_ALL=en_US.utf-8' | sudo tee -a /etc/environment > /dev/null
. /etc/environment