Closed mstormi closed 4 years ago
does anyone know if we need it at all (given there's also LC_CTPYE, LANG and LANGUAGE) ?
Does dpkg-reconfigure locales
fix the problem?
Does
dpkg-reconfigure locales
fix the problem?
Interactively started, yes. That however does not work during install.
It also depends on user preferences if locale is none of the default English+German.
openhabian.conf[.dist] has a line locales="en_US.UTF-8 de_DE.UTF-8"
and dpkg-reconfigure locales
is called in locale_setting()
so I would expect that to work already, but obviously it does not.
See also errors in install log https://github.com/mstormi/openhabian/blob/shellcheck/first-boot.log#L450 and below
This is on using menu option 12 (set locale) EDIT: menu 12 does not (no longer?) call locale_setting(). Unattended install still does, though.
2019-09-07_23:04:17_CEST [openHABian] Setting locale based on user choice...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANGUAGE=en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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_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_MESSAGES 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)...
de_DE.UTF-8...
This is what happens during installation. So the German locale IS generated at the beginning, but the errors below (on variable assignment in shell !) are strange.
[90;01m$ dpkg-reconfigure --frontend=noninteractive locales [39;49;00m
+ dpkg-reconfigure --frontend=noninteractive locales
Generating locales (this might take a while)...
de_DE.UTF-8... done
en_GB.UTF-8... done
en_US.UTF-8... done
Generation complete.
+ return 0
+ cond_redirect LANG=en_US.UTF-8
+ '[' -n '' ']'
+ echo -e '\n\033[90;01m$ LANG=en_US.UTF-8 \033[39;49;00m'
[90;01m$ LANG=en_US.UTF-8 [39;49;00m
+ LANG=en_US.UTF-8
/opt/openhabian/functions/helpers.bash: line 24: LANG=en_US.UTF-8: command not found
+ return 127
+ cond_redirect LC_ALL=en_US.UTF-8
+ '[' -n '' ']'
+ echo -e '\n\033[90;01m$ LC_ALL=en_US.UTF-8 \033[39;49;00m'
[90;01m$ LC_ALL=en_US.UTF-8 [39;49;00m
+ LC_ALL=en_US.UTF-8
/opt/openhabian/functions/helpers.bash: line 24: LC_ALL=en_US.UTF-8: command not found
+ return 127
+ cond_redirect LC_CTYPE=en_US.UTF-8
+ '[' -n '' ']'
+ echo -e '\n\033[90;01m$ LC_CTYPE=en_US.UTF-8 \033[39;49;00m'
[90;01m$ LC_CTYPE=en_US.UTF-8 [39;49;00m
+ LC_CTYPE=en_US.UTF-8
/opt/openhabian/functions/helpers.bash: line 24: LC_CTYPE=en_US.UTF-8: command not found
+ return 127
+ cond_redirect LANGUAGE=en_US.UTF-8
+ '[' -n '' ']'
+ echo -e '\n\033[90;01m$ LANGUAGE=en_US.UTF-8 \033[39;49;00m'
[90;01m$ LANGUAGE=en_US.UTF-8 [39;49;00m
+ LANGUAGE=en_US.UTF-8
/opt/openhabian/functions/helpers.bash: line 24: LANGUAGE=en_US.UTF-8: command not found
+ return 127
+ export LANG LC_ALL LC_CTYPE LANGUAGE
+ cond_redirect update-locale 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANGUAGE=en_US.UTF-8'
+ '[' -n '' ']'
+ echo -e '\n\033[90;01m$ update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANGUAGE=en_US.UTF-8 \033[39;49;00m'
[90;01m$ update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANGUAGE=en_US.UTF-8 [39;49;00m
+ update-locale 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANGUAGE=en_US.UTF-8'
+ return 0
+ echo OK
OK
I found a solution to this by editing the locale file in /etc/default.
_# File generated by update-locale
LANG=en_AU.utf-8
LC_ALL=en_AU.utf-8
LANGUAGE=en_AU.utf-8_
Previously, it only had LANG=en_AU.UTF-8 and generated the warnings about values that were not set. Using locale -av gives:
[15:25:55] openhabian@openhab:/etc/default$ locale -av
locale: de_DE.utf8 archive: /usr/lib/locale/locale-archive
-------------------------------------------------------------------------------
title | German locale for Germany
source | Free Software Foundation, Inc.
address | http://www.gnu.org/software/libc/
email | bug-glibc-locales@gnu.org
language | German
territory | Germany
revision | 1.0
date | 2000-06-24
codeset | UTF-8
locale: en_AU.utf8 archive: /usr/lib/locale/locale-archive
-------------------------------------------------------------------------------
title | English locale for Australia
source | RAP
address | Sankt Jørgens Alle 8, DK-1615 København V, Danmark
email | bug-glibc-locales@gnu.org
language | Australian English
territory | Australia
revision | 1.0
date | 2000-06-29
codeset | UTF-8
locale: en_GB.utf8 archive: /usr/lib/locale/locale-archive
-------------------------------------------------------------------------------
title | English locale for Britain
source | RAP
address | Sankt Jørgens Alle 8, DK-1615 København V, Danmark
contact | Keld Simonsen
email | bug-glibc-locales@gnu.org
language | British English
territory | United Kingdom
revision | 1.0
date | 2000-06-28
codeset | UTF-8
locale: en_US.utf8 archive: /usr/lib/locale/locale-archive
-------------------------------------------------------------------------------
title | English locale for the USA
source | Free Software Foundation, Inc.
address | http://www.gnu.org/software/libc/
email | bug-glibc-locales@gnu.org
language | American English
territory | United States
revision | 1.0
date | 2000-06-24
codeset | UTF-8
locale: C.UTF-8 directory: /usr/lib/locale/C.UTF-8
-------------------------------------------------------------------------------
title | C locale
email | aurel32@debian.org
language | C
revision | 1.6
date | 2016-08-08
codeset | UTF-8
[15:25:58] openhabian@openhab:/etc/default$
so while the C locale is C.UTF-8 all others are ll_cc.utf8.
I don't know if it was the change in case or adding the two extra lines .. Hope it helps.
I could not start my grafana server on my openhab.
_[18:52:50] openhabian@openhab:~$ sudo systemctl enable grafana-server Synchronizing state of grafana-server.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable grafana-server perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANGUAGE=en_US.UTF-8" 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 = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANGUAGE=en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
I already installed the language but still does not work. does anybody has an idea?
I could not start my grafana server on my openhab.
Then open a thread on the community and don't capture our issue. Please.
PS: read the previous post edit that file
Cannot reproduce after #742 was merged so will close for the time being. Reopen if you encounter this again.
I am encountering this issue again. System info:
Raspberry Pi 3B+ Rev 1.3
OpenHAB 3.0.2 - Release Build
Kernal: Linux 5.10.17-v7+
openhabian-config reports: openHABian Configuration Tool <80><94> [openHAB3]{2021-05-05T15:53:37-06:00}(3e35b6d)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8 UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
@mstormi I don't have permission to reopen the issue
this is 2yrs old option 12 does not exist any more so clearly not the same thing
open a new issue and provide a comprehensive description what you did and debug logging that shows input and output