How to Fixed “cannot change locale (UTF-8)” Error in Centos 7

Previously we have shared how to fix the LC_Type locale error in Centos 6 and the steps below will show how to fix the error message “warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory” in CentOS 7.

If you terminal has set to UTF-8 and most probably will get the error messages after remotely ssh into the server

The errors not only in terminal, it’s possible appear when compiling stuff in Perl or Python as well.

The fix the error above, fire up the file /etc/environment and add this one liner will magically made the error puff… go away.