Fix locale/font problems in CentOS 6 Linux
If you get this warning when running perl scripts:
# perl -v perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "(unset)", LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi |
then to solve the problem add the following line to ~/.bashrc or to /etc/profile:
export LC_ALL=C |
If you add previous line to /etc/profile make sure it it at the end of the file.
To solve the following warning message when you login via ssh:
root@10.0.0.15's password: Last login: Fri Jun 26 18:29:43 2015 from 10.0.0.7 -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory |
Edit /etc/sysconfig/i18n and add the following lines:
LANG="en_US.UTF-8" SYSFONT="latarcyrheb-sun16" LC_ALL="en_US.UTF-8" LANGUAGE="en_US" |