Fixing perl: warning: Setting locale failed in CentOS 7

306
perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = (unset),

LC_ALL = (unset),

LC_CTYPE = "UTF-8",

LANG = (unset)

    are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

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

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = (unset),

LC_ALL = (unset),

LC_CTYPE = "UTF-8",

LANG = "en_GB.utf8"

    are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

Open /etc/environment with text editor or edit with nano
Eg: nano /etc/environment

Add the following lines

LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8

Re-login to your SSH

You can submit your Guest Posts too! Learn more
+