perl: warning: Setting locale failed.
Notes on resolving Perl locale warnings by setting LANGUAGE and LC_ALL, with examples for different environments and the Fish shell.
updated 1 min read
You may ever facing this issue, and yes so do I.
[root@server ~]# some command hereperl: warning: Setting locale failed.perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "C.UTF-8" are supported and installed on your system.perl: warning: Falling back to the standard locale ("C").For this, we just need to set the environment variable.
Find your shell profile. Maybe in ~/.profile /.bash_profile fish shell, etc.
Then set this environment variable.
# Windowsexport LANGUAGE=en_US.UTF-8export LC_ALL=en_US.UTF-8
# MacOSexport LANG=en_US.UTF-8export LC_ALL=en_US.UTF-8
# Fishset -gx LANG "en_US.utf-8"Reload your shell, and try to re-run your command.
[root@server ~]# some command hereITS WORKS!