Differences between revisions 1 and 2
Revision 1 as of 2021-05-05 12:30:54
Size: 1536
Editor: Burathar
Comment:
Revision 2 as of 2021-05-05 12:31:33
Size: 1514
Editor: Burathar
Comment:
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
If this happens, do the following: = Solution =

Contents

  1. Cause
  2. Solution

Cause

On linux systems, when the enviroment variables refer to locales that haven't been installed locally, a vague perl error can be thrown in some instance:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US:en",
        LC_ALL = (unset),
        LC_ADDRESS = "nl_NL.UTF-8",
        LC_NAME = "nl_NL.UTF-8",
        LC_MONETARY = "nl_NL.UTF-8",
        LC_PAPER = "nl_NL.UTF-8",
        LC_IDENTIFICATION = "nl_NL.UTF-8",
        LC_TELEPHONE = "nl_NL.UTF-8",
        LC_MEASUREMENT = "nl_NL.UTF-8",
        LC_TIME = "nl_NL.UTF-8",
        LC_NUMERIC = "nl_NL.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8")

Solution

  • Run the export command, to check what your locale settings are. Look for lines that look like this:

declare -x LANG="en_US.UTF-8"
declare -x LANGUAGE="en_US:en"
declare -x LC_ADDRESS="nl_NL.UTF-8"
declare -x LC_IDENTIFICATION="nl_NL.UTF-8"
declare -x LC_MEASUREMENT="nl_NL.UTF-8"
declare -x LC_MONETARY="nl_NL.UTF-8"
declare -x LC_NAME="nl_NL.UTF-8"
declare -x LC_NUMERIC="nl_NL.UTF-8"
declare -x LC_PAPER="nl_NL.UTF-8"
declare -x LC_TELEPHONE="nl_NL.UTF-8"
declare -x LC_TIME="nl_NL.UTF-8"

In this case, nl_NL.UTF-8 is the problem

  • Edit /etc/locale.gen an uncomment the locales referred in your enviroment variables

  • Run sudo locale-gen to generate any new locales

Now the problem should be resolved.

Howto/Locale (last edited 2021-05-05 12:31:33 by Burathar)