You are not logged in.

#1 2016-05-26 09:51:22

Hering
Member
Registered: 2016-05-26
Posts: 23

Cannot set LC_* to default locale

Hello,
I recently installed ArchLinux on my desktop but I made a typo when initializing the languages..
I typed de_DE-UTF-8 instead of de_DE.UTF-8 and now my system seems to be messed up: man cannot set the locales and locale -a throws an error.
Changing the language manually in /etc/locale.conf and re-running locale-gen doesn't seem to solve the problem as you can see here:

localectl
   System Locale: LANG=de_DE.UTF-8
       VC Keymap: de-latin1
      X11 Layout: n/a

grep -v '^#' /etc/locale.*
/etc/locale.conf:LANG=de_DE.UTF-8
/etc/locale.conf:LC_CTYPE="de_DE.UTF-8"
/etc/locale.conf:LC_NUMERIC="de_DE.UTF-8"
/etc/locale.conf:LC_TIME="de_DE.UTF-8"
/etc/locale.conf:LC_COLLATE="de_DE.UTF-8"
/etc/locale.conf:LC_MONETARY="de_DE.UTF-8"
/etc/locale.conf:LC_MESSAGES="de_DE.UTF-8"
/etc/locale.conf:LC_PAPER="de_DE.UTF-8"
/etc/locale.conf:LC_NAME="de_DE.UTF-8"
/etc/locale.conf:LC_ADDRESS="de_DE.UTF-8"
/etc/locale.conf:LC_TELEPHONE="de_DE.UTF-8"
/etc/locale.conf:LC_MEASUREMENT="de_DE.UTF-8"
/etc/locale.conf:LC_IDENTIFICATION="de_DE.UTF-8"
/etc/locale.conf:LC_ALL="de_DE.UTF-8"
/etc/locale.conf:
/etc/locale.gen:de_DE.UTF-8 UTF-8  
/etc/locale.gen:en_US.UTF-8 UTF-8  

locale -a 
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
de_DE.utf8
en_US.utf8

Is there any way to fix this?

Sincerely,
Hering

Offline

#2 2016-05-26 13:00:54

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Cannot set LC_* to default locale

Is the locale also correct in /etc/vconsole.conf?

This is a long short, but sometimes an error in this file can cause issues.

Last edited by mrunion (2016-05-26 13:01:59)


Matt

"It is very difficult to educate the educated."

Offline

#3 2016-05-26 13:49:24

Hering
Member
Registered: 2016-05-26
Posts: 23

Re: Cannot set LC_* to default locale

In /etc/vconsole.conf I have this:

cat /etc/vconsole.conf                                                                                                                                                                                                    ~
KEYMAP=de-latin1

Looks alright to me...

Offline

#4 2016-05-26 13:50:52

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: Cannot set LC_* to default locale

Anything about LANG or LANGUAGE in your shell init files?

Online

#5 2016-05-26 13:53:18

Hering
Member
Registered: 2016-05-26
Posts: 23

Re: Cannot set LC_* to default locale

Hmm, no only some history-settings etc created by zsh and my usual aliases in there.
It does help though when I do source /etc/locale.conf for both me and root user but after a reboot it is gone again.

Offline

#6 2016-05-26 14:06:43

damjan
Member
Registered: 2006-05-30
Posts: 452

Re: Cannot set LC_* to default locale

you only need to set LANG, either by editing the file or with `localectl set-locale …`

to create the locale in the first place, you need to edit /etc/locale.gen and then run locale-gen

Offline

#7 2016-05-26 14:09:31

Hering
Member
Registered: 2016-05-26
Posts: 23

Re: Cannot set LC_* to default locale

Yes thats exactly what I did. In the /etc/locale.gen I uncommented de_DE.UTF-8 and en_US.UTF-8 then I ran locale-gen.
But since I made a typo in the initial configuration (I followed the manual here on archlinux.org) it wont work. So I tried setting all these parameters manually and call source.. now on every boot but thats a dirty solution.

Last edited by Hering (2016-05-26 14:09:56)

Offline

Board footer

Powered by FluxBB