Locale Error in centos

Seif Hatem picture Seif Hatem · Mar 15, 2014 · Viewed 13.2k times · Source

Every time I login to my CentOS 6 server through SSH I get this error

Can anyone please explain what does that error mean & how to fix?

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

Answer

Seif Hatem picture Seif Hatem · Mar 15, 2014

The Fix: Thanks for Millie Smith (https://stackoverflow.com/users/2850543/millie-smith) & http://linuxforums.org.uk/index.php?topic=10318.0

Using root user through ssh

Run these commands

vi /etc/environment

& add these lines:

LANG=en_US.utf-8
LC_ALL=en_US.utf-8