Jump to content

Recommended Posts

Posted

Hi,

this is a problem that has persisted on my Orange Pi H2+ Board (running Armbian) for quite some time now. At one stage I thought I had resolved the issue, but now since an update to some unrelated software, said software no longer works. I have tracked this back to the locale settings, which, for all intents and purposes, don't exist. I have tried a variety of fixes, such as trying to set Locale using the

armbian-config

, but Locale remains adamantly blank. I can SSH into the board (which is where I ran the arm config program, as well as the following commands).

 

I tried

dpkg-reconfigure locales 

but I only get told the following:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = "en_NZ.utf8",
    LC_PAPER = "en_NZ.UTF-8",
    LC_ADDRESS = "en_NZ.UTF-8",
    LC_MONETARY = "en_NZ.UTF-8",
    LC_NUMERIC = "en_NZ.UTF-8",
    LC_TELEPHONE = "en_NZ.UTF-8",
    LC_IDENTIFICATION = "en_NZ.UTF-8",
    LC_MEASUREMENT = "en_NZ.UTF-8",
    LC_TIME = "en_NZ.UTF-8",
    LC_NAME = "en_NZ.UTF-8",
    LANG = "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
dpkg-query: package 'locales' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
/usr/sbin/dpkg-reconfigure: locales is not installed
 

 

Finally, running

locale -a

 

I simply end up with the following:

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
C.UTF-8
POSIX

 

I have looked at your documentation too, and while I can find information on how to change to an alternative locale, there is no information as to how I go about INSTALLING missing locales. How do I fix this?

 

 

Posted

The locales package is required for locales anything other than C/POSIX, generation is necessary to be able to provide a lot smaller package rather than shipping all locales pregenerated -- i.e. did you install it?

 

(/usr/bin/locale is libc stuff without actual locale data) 

Posted
On 10/14/2020 at 1:20 PM, Igor said:

Hi Igor, sorry but that's what I tried already a few days ago. All I appear to find is instructions on how to list the locales that are already installed (and I only see C) but I have not been able to find out how to download/install new locales

 

On 10/15/2020 at 5:15 PM, xwiggen said:

The locales package is required for locales anything other than C/POSIX, generation is necessary to be able to provide a lot smaller package rather than shipping all locales pregenerated -- i.e. did you install it?

 

(/usr/bin/locale is libc stuff without actual locale data) 

I obviously have /usr/bin however the locale directory does not exist.

 

OK, so the fastest way to find a solution is to first make an idiot of yourself, and then the solution pops up...

 

I found this link where a similar question is asked, and followed the advice given in the answer there. When I ran the third command (after running the first two of course), a program popped up in the terminal window, where I was able to install and set my desired locale. Thanks guys for the point in the right direction. I have no idea why I was not able to find this before!

https://serverfault.com/questions/301896/how-to-fix-locale-settings-in-debian-squeeze

Posted (edited)

You can try 

 

LC_ALL = C

 

and see if it solves your problems. It appears to be a bug in 32-bit GLIBC for Linux/ARM

I have the problem myself when I choose Time zone Amsterdam, Language English and Keyboard US

Edited by Dirk_P_Broer
combination of different locales that creates the problem
Posted (edited)
On 2/24/2022 at 1:01 AM, Cornelius said:

Armv7 and Locales can sometimes be a bitch. Have you tried? sudo apt update; sudo apt install -y locales-all

I did, found it didn't solve my problems and searched further. That how I came up with LC_ALL = C

On a Raspberry Pi 3B the problem went away when I changed 32-bit Raspberry Pi OS for 64-bit Raspberry Pi OS, so changing glibc as well.

Edited by Dirk_P_Broer
32-bit OS vs 64-bit OS on same board
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines