You are not logged in.

#1 2022-08-30 13:18:54

ModelHX
Member
From: Chicago, Illinois, USA
Registered: 2016-08-02
Posts: 8

[SOLVED] Locale issues, even after generating locales

I installed Arch about two weeks ago. (I've had previous experience with Arch, but that was on a headless system; this is my first time running Arch with a desktop environment.)

System information:
Operating System: Arch Linux
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.1-arch2-1 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-3570K CPU @ 3.40GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 680/PCIe/SSE2
Manufacturer: BIOSTAR Group
Product Name: TZ77XE3
System Version: 5.0

Problem:
Although I haven't noticed any overt issues with my system, I'm receiving error messages from several commands that indicate to me that something's not configured properly in my system locales.

$ man cat
man: can't set the locale; make sure $LC_* and $LANG are correct 
$ sudo pacman -Syu
[...]
(5/7) Warn about old perl modules
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_us.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

I know this is a common newbie issue, but I've read through as many forum posts as I can find about locale issues and none of the recommended fixes seem to solve the problem.

Things I've tried:
- Rebooting the system
- Making sure that in /etc/locale.gen, the line "en_US.UTF-8 UTF-8" has been uncommented.
- Checking to make sure that the line in /etc/locale.gen reads as "en_US.UTF-8 UTF-8" (emphasis added) and not just "en_US.UTF-8"
- After double-checking /etc/locale.gen, running "sudo locale-gen" (output below)
- Checking my .bashrc, .bash_profile, etc. for any lines that exported any locale settings
- I'm using KDE, so I've examined ~/.config/plasma-localerc for any settings that conflict with those from locale, and found none (full export below)

I have NOT tried setting LC_ALL to "en_us.UTF-8", as I have read that this is considered bad practice and may cause issues. If that's not true, let me know and I'll try that.

---------------------------------------------

Diagnostic Command Output:
Below are many of the diagnostic commands that are usually requested, but please let me know of anything else I can post to help with this and I'll add that in.

$ locale
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
LANG=en_us.UTF-8
LC_CTYPE="en_us.UTF-8"
LC_NUMERIC="en_us.UTF-8"
LC_TIME="en_us.UTF-8"
LC_COLLATE="en_us.UTF-8"
LC_MONETARY="en_us.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_us.UTF-8"
LC_IDENTIFICATION="en_us.UTF-8"
LC_ALL=
$ 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
C.UTF-8
POSIX
en_US.utf8
$ cat /etc/locale.conf
LANG=en_us.UTF-8
$ cat ~/.config/plasma-localerc
[Formats]
LANG=en_us.UTF-8
LC_TIME=en_us.UTF-8
$ sudo locale-gen
Generating locales...
  en_US.UTF-8... done
Generation complete.

Last edited by ModelHX (2022-08-30 13:50:42)

Offline

#2 2022-08-30 13:30:05

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Locale issues, even after generating locales

ModelHX wrote:
$ cat /etc/locale.conf
LANG=en_us.UTF-8

en_us and en_US are not the same thing.

Offline

#3 2022-08-30 13:41:46

ModelHX
Member
From: Chicago, Illinois, USA
Registered: 2016-08-02
Posts: 8

Re: [SOLVED] Locale issues, even after generating locales

FFS, yep, I didn't notice those weren't the same. Thanks for pointing that out.

Okay, so to address this, I should simply follow the steps from https://wiki.archlinux.org/title/locale … tem_locale ? Update /etc/locale.conf (and ~/.config/plasma-localerc , since it's using the incorrect values as well), and either logout/login, or unset LANG and source /etc/profile.d/locale.sh?

Or are there any other steps I need to take in this case to "repair" things since it was never configured properly to begin with?

Edit: Following the steps from https://wiki.archlinux.org/title/locale … tem_locale solved the problem.

Last edited by ModelHX (2022-08-30 13:49:35)

Offline

Board footer

Powered by FluxBB