You are not logged in.

#1 2024-01-11 10:45:44

tesirfsm
Member
Registered: 2021-06-07
Posts: 12

locale: Cannot set LC_ALL to default locale: No such file or [SOLVED]

I get this error when running locale:
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8" 
LC_NUMERIC=de_DE.UTF-8
LC_TIME=en_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=en_DE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

In /etc/locale.gen I uncommented de_DE.UTF-8 UTF-8 and en_US.UTF-8 UTF-8.

/etc/locale.conf looks like this :
LANG=en_US.UTF-8
LC_ALL=de_DE.UTF-8

As you can see in locale.conf I want everything to use the German metrics except for the language which is supposed to be in English. What am I doing wrong?
Thanks in advance!

Last edited by tesirfsm (2024-01-11 12:48:45)

Offline

#2 2024-01-11 11:04:05

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 646

Re: locale: Cannot set LC_ALL to default locale: No such file or [SOLVED]

You can't set LC_ALL in /etc/locale.conf and you shouldn't even try since LC_ALL should only be used for debugging/troubleshooting.
The tip in https://wiki.archlinux.org/title/Locale … ult_locale seems to describe your use case.

Offline

#3 2024-01-11 11:25:44

tesirfsm
Member
Registered: 2021-06-07
Posts: 12

Re: locale: Cannot set LC_ALL to default locale: No such file or [SOLVED]

Ok, I edited locale.conf to look like this:                       
LANG=en_US.UTF-8
LC_TIME=de_DE.UTF-8

However I am still receiving the same error.

Offline

#4 2024-01-11 11:47:18

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 646

Re: locale: Cannot set LC_ALL to default locale: No such file or [SOLVED]

I assumed you wanted:

LANG=de_DE.UTF-8
LC_MESSAGES=en_US.UTF-8

Anyway, post the output of:

$ locale
$ locale -a
$ printenv | grep -E '^(LANG|LC_)'

Offline

#5 2024-01-11 12:07:51

tesirfsm
Member
Registered: 2021-06-07
Posts: 12

Re: locale: Cannot set LC_ALL to default locale: No such file or [SOLVED]

$ locale:
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=en_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=en_DE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

$ locale -a:
C
C.utf8
de_DE.utf8
en_US.utf8
POSIX

$ printenv | grep -E '^(LANG|LC_)':
printenv | grep -E '^(LANG|LC_)'

Offline

#6 2024-01-11 12:12:19

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 646

Re: locale: Cannot set LC_ALL to default locale: No such file or [SOLVED]

tesirfsm wrote:

LC_TIME=en_DE.UTF-8
LC_MEASUREMENT=en_DE.UTF-8

There's no such locale.

tesirfsm wrote:

$ printenv | grep -E '^(LANG|LC_)':
printenv | grep -E '^(LANG|LC_)'

That command should give you some output.

Are you using KDE? If so, follow https://wiki.archlinux.org/title/Locale … g_language.

Offline

#7 2024-01-11 12:46:57

tesirfsm
Member
Registered: 2021-06-07
Posts: 12

Re: locale: Cannot set LC_ALL to default locale: No such file or [SOLVED]

Sorry, I didn't copy the output of printenv | grep -E '^(LANG|LC_)' correctly
LANGUAGE=
LC_MONETARY=de_DE.UTF-8
LANG=en_US.UTF-8
LC_MEASUREMENT=en_DE.UTF-8
LC_TIME=en_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8

Ok I now removed "LC_TIME=de_DE.UTF-8" from the config and set the time locale to use de_De.UTF-8 via KDE. Everything works now.
Thanks for the help

Offline

#8 2024-01-11 14:33:59

seth
Member
Registered: 2012-09-03
Posts: 58,797

Re: locale: Cannot set LC_ALL to default locale: No such file or [SOLVED]

Neither en_DE.UTF-8 nor de_De.UTF-8 are valid locales.

Offline

Board footer

Powered by FluxBB