Locale issues - Correct and sustainable fix?

If none of the more specific forums is the right place to ask

Locale issues - Correct and sustainable fix?

Postby binaryanomaly » 2018-05-20 19:58

It feels like I had issues with locales since ever and I'd like to solve it now once and forever properly.

Code: Select all
sudo dpkg-reconfigure locales

and choosing "en_US.utf8" produces the following - which is exemplar for the errors that will then happen also with other apps:

Code: Select all
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = "en_US:en",
   LC_ALL = (unset),
   LC_CTYPE = "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").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = "en_US:en",
   LC_ALL = (unset),
   LC_CTYPE = "UTF-8",
   LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = "en_US:en",
   LC_ALL = (unset),
   LC_CTYPE = "UTF-8",
   LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").


How do I fix this in a sustainable and correct manner?

I helped myself so far by placing
Code: Select all
export LC_ALL="en_US.UTF-8"

in /etc/environment which seems to make the error message disappear.

But it somehow doesn't feel right? What would be the proper way of fixing it?
Thanks.
binaryanomaly
 
Posts: 3
Joined: 2018-05-13 18:43

Re: Locale issues - Correct and sustainable fix?

Postby Head_on_a_Stick » 2018-05-21 05:24

E Pluribus Unix
User avatar
Head_on_a_Stick
 
Posts: 7770
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Locale issues - Correct and sustainable fix?

Postby binaryanomaly » 2018-05-21 12:55

Head_on_a_Stick wrote:https://wiki.debian.org/Locale#Manually


Thanks. "en_US.UTF-8 UTF-8" is already in locale.gen and following the procedure in the "Manually" section doesn't make the error message go away:

Code: Select all
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
   LANGUAGE = "en_US:en",
   LC_ALL = (unset),
   LC_CTYPE = "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").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
...
binaryanomaly
 
Posts: 3
Joined: 2018-05-13 18:43


Return to General Questions

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable