You are not logged in.

#1 2016-07-19 22:14:41

Amorandron
Member
Registered: 2016-07-06
Posts: 11

[SOLVED] Locale Error

Hi! Everytime I run a command it returns me this message (I use zsh):

╭─jan@arch-jan  ~  
╰─$ man                                  
man: can't set the locale; make sure $LC_* and $LANG are correct
What manual page do you want?
╭─jan@arch-jan  ~  
╰─$     

I have no idea what's wrong. When I run locale -a it returns this:

╭─jan@arch-jan  ~  
╰─$ locale -a
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
C
POSIX
en_US
en_US.iso88591
en_US.utf8
╭─jan@arch-jan  ~  
╰─$ 

Locale:

╭─jan@arch-jan  ~  
╰─$ locale                                                                             1 ↵
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_EN.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_NL.UTF-8
LC_TIME=en_NL.UTF-8
LC_COLLATE=C
LC_MONETARY=en_NL.UTF-8
LC_MESSAGES="en_EN.UTF-8"
LC_PAPER="en_EN.UTF-8"
LC_NAME="en_EN.UTF-8"
LC_ADDRESS="en_EN.UTF-8"
LC_TELEPHONE="en_EN.UTF-8"
LC_MEASUREMENT=en_NL.UTF-8
LC_IDENTIFICATION="en_EN.UTF-8"
LC_ALL=
╭─jan@arch-jan  ~  
╰─$ 

Locale.conf contents:

LANG=en_US.UTF-8

Last edited by Amorandron (2016-07-20 10:52:29)

Offline

#2 2016-07-19 22:19:39

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Locale Error

Not a Kernel Issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-07-19 22:27:52

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] Locale Error

You've somehow set locales that don't exist on your system. Since that's your locale.conf, this is possibly set by your desktop environment's location settings.

You can either generate the locales that are missing, or set everything to en_US.
https://wiki.archlinux.org/index.php/locale

Offline

#4 2016-07-20 10:52:10

Amorandron
Member
Registered: 2016-07-06
Posts: 11

Re: [SOLVED] Locale Error

Solved, just running

$ export LANG=en_US.UTF-8

fixed it for me.

Offline

#5 2017-12-02 14:51:09

portaloffreedom
Member
Registered: 2014-12-06
Posts: 3

Re: [SOLVED] Locale Error

I got into the same problem.

The issue for me was that, in kde settings, the locale en_NL.UTF-8 is allowed
and is overriding the locale.conf configuration.

Changing the kde settings into an existing locale fixed the issue for me.

Offline

#6 2017-12-02 15:28:54

Xabre
Member
From: Serbia
Registered: 2009-03-19
Posts: 750

Re: [SOLVED] Locale Error

Most of Linux apps use glibc locale definitions, but in their vast 'wisdom' KDE folks have decided to abandon KLocale library from KDE4 an earlier (which was awesome), and to use QLocale in Plasma 5 instead. Problem is that Qlocale isn't based on glibc, but ICU which has, in many cases, different locale definitions and different codes for locales and whole l10n suffers from it (Qt part of the app wants one locale name, rest of the app wants other locale name).  In other words: don't trust KDE/Plasma to set or do anything with locales for you, do it manually, and always do it the way that majority of your system will recognize and respect.

Offline

Board footer

Powered by FluxBB