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

Assalamualaikum,

This warning/error ever happened to you? Whenever you try to ssh to your server or try to update your spamassassin (sa-update) you will get this error.

Last login: Mon Nov  6 11:17:54 2017 from 192.168.88.14
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
[root@sa ~]# sa-update
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").

Follow below steps to fix it.

  1. login to your server
  2. vi /etc/environment and add below lines
  3. Save and quit
  4. Done

Wassalam…

This entry was posted in Linux, RedHat. Bookmark the permalink.