Setting locale failed

  • Platform information:
    • Hardware: R Pi 3 Model B
    • OS: openhabian 1.4.1

Hello,
I did a clean installation of openhabian 1.4.1.
After the first boot I want to set my locale to connect with the local wifi adapter of the pi to the network.
But setting the locale fails every time. Maybe you have an idea what I am doing wrong?
Thank you in advance, BR Sebastian

[16:29:17] openhabian@openHABianPi:~$ sudo openhabian-config
[sudo] Passwort für openhabian: 
Das hat nicht funktioniert, bitte nochmal probieren.
[sudo] Passwort für openhabian: 
2018-05-20_16:29:38_CEST [openHABian] Checking for root privileges... OK
2018-05-20_16:29:38_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2018-05-20_16:29:40_CEST [openHABian] openHABian configuration tool version: [master]v1.4.1-399(
47771f8)
2018-05-20_16:29:40_CEST [openHABian] Checking for changes in origin... OK
2018-05-20_16:29:49_CEST [openHABian] Setting locale based on user choice... 
Generating locales (this might take a while)...
  de_CH.UTF-8... done
Generation complete.
*** update-locale: Error: invalid locale settings:  LC_CTYPE=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 LANG
UAGE=de_DE.UTF-8 LANG=de_CH.UTF-8

$ update-locale LANG=#de_DE.UTF-8 LC_ALL=#de_DE.UTF-8 LC_CTYPE=#de_DE.UTF-8 LANGUAGE=#de_DE.UTF-
8 
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = "de_DE.UTF-8",
 LC_ALL = "de_DE.UTF-8",
 LC_CTYPE = "de_DE.UTF-8",
 LANG = "de_DE.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
*** update-locale: Error: invalid locale settings:  LANGUAGE=#de_DE.UTF-8 LANG=#de_DE.UTF-8 LC_C
TYPE=#de_DE.UTF-8 LC_ALL=#de_DE.UTF-8
2018-05-20_16:30:21_CEST [openHABian] Checking for default openHABian username:password combinat
ion... perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = "de_DE.UTF-8",
 LC_ALL = "de_DE.UTF-8",
 LC_CTYPE = "de_DE.UTF-8",
 LANG = "de_DE.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
FAILED

You can try to set it using raspi-config. If it isn’t installed you can install is with sudo apt-get install raspi-config. Then run it like openhabian-config and there is a menu for setting the locale.

1 Like

Thank you very much! The configuraiton with raspi-config works. See here:

$ update-locale LANG=de_CH.UTF-8 LC_ALL=de_CH.UTF-8 LC_CTYPE=de_CH.UTF-8 LANGUAGE=de_CH.UTF
-8 
2018-05-22_19:46:43_CEST [openHABian] Checking for default openHABian username:password com
bination... FAILED
2018-05-22_19:46:45_CEST [openHABian] We hope you got what you came for! See you again soon
 ;)
[19:46:45] openhabian@openHABianPi:~$ sudo raspi-config
Generating locales (this might take a while)...
  de_CH.UTF-8... done
Generation complete.
[19:47:18] openhabian@openHABianPi:~$ 

For me this is OK.