You are not logged in.

#1 2025-10-07 06:29:25

tcn
Member
Registered: 2011-09-30
Posts: 83

invalid value for parameter "lc_messages": "C.UTF-8"

Some update messed up my locale and I so far couldn't figure out what's wrong. Things seem to continue to work as expected except for postgres that fails with:

Oct 06 16:56:12 box postgres[2398139]: 2025-10-06 16:56:12.836 CEST [2398139] LOG:  invalid value for parameter "lc_messages": "C.UTF-8" 
Oct 06 16:56:12 box postgres[2398139]: 2025-10-06 16:56:12.836 CEST [2398139] LOG:  invalid value for parameter "lc_monetary": "C.UTF-8" 
Oct 06 16:56:12 box postgres[2398139]: 2025-10-06 16:56:12.837 CEST [2398139] LOG:  invalid value for parameter "lc_numeric": "C.UTF-8" 
Oct 06 16:56:12 box postgres[2398139]: 2025-10-06 16:56:12.837 CEST [2398139] LOG:  invalid value for parameter "lc_time": "C.UTF-8" 
Oct 06 16:56:12 box postgres[2398139]: 2025-10-06 16:56:12.837 CEST [2398139] FATAL:  configuration file "/var/lib/postgres/data/postgresql.conf" contains errors 
Oct 06 16:56:12 box systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
# grep -E "^[^#]" /etc/locale.gen
en_US.UTF-8 UTF-8  
en_US ISO-8859-1  
# localectl                                                                                                                                                                                                                                                                                                                                                                         System Locale: LANG=en_US.UTF-8
    VC Keymap: us
   X11 Layout: (unset)         
# cat /etc/locale.conf
LANG=en_US.UTF-8
LC_TIME=en_US.UTF-8
# locale -a | grep -E "^C"
C
# localectl list-locales | grep -ic C.UTF8
0

What could be wrong. As mentioned this happened due to some update a while ago, used to work fine before for years and I don't remember to have changed anything wrt locale.

thx
tcn

Offline

#2 2025-10-07 06:33:41

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,641

Re: invalid value for parameter "lc_messages": "C.UTF-8"

Have you checked whats in the configuration file /var/lib/postgres/data/postgresql.conf?

Offline

#3 2025-10-07 08:34:23

tcn
Member
Registered: 2011-09-30
Posts: 83

Re: invalid value for parameter "lc_messages": "C.UTF-8"

Well, C.UTF8, default Computer non-locale locale:

# These settings are initialized by initdb, but they can be changed.
lc_messages = 'C.UTF-8'                 # locale for system error message
                                        # strings
lc_monetary = 'C.UTF-8'                 # locale for monetary formatting
lc_numeric = 'C.UTF-8'                  # locale for number formatting
lc_time = 'C.UTF-8'                     # locale for time formatting

Offline

#4 2025-10-07 08:45:12

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,875

Re: invalid value for parameter "lc_messages": "C.UTF-8"

ls -l /usr/lib/locale/locale-archive /usr/lib/locale/C.UTF8 /usr/lib/locale/C.utf8
locale
locale -a # don't grep

Edit: try "C.utf8", but apparently that's not in your "locale -a" either?

Last edited by seth (2025-10-07 08:46:08)

Offline

#5 2025-10-07 08:52:01

tcn
Member
Registered: 2011-09-30
Posts: 83

Re: invalid value for parameter "lc_messages": "C.UTF-8"

# ls -l /usr/lib/locale/locale-archive /usr/lib/locale/C.UTF8 /usr/lib/locale/C.utf8
ls: cannot access '/usr/lib/locale/C.UTF8': No such file or directory
-rw-r--r-- 1 root root 4432944 Aug  8 08:38 /usr/lib/locale/locale-archive

/usr/lib/locale/C.utf8:
total 0
drwxr-xr-x 1 root root 0 Aug  7 06:33 LC_MESSAGES

# paru -Qo /usr/lib/locale/C.UTF8
error: No package owns /usr/lib/locale/C.UTF8

Lower casing utf8 in postgres.conf doesn't work either.

locale returns en_US, locale -a returns pretty much all locales, over 500. And nope, locale -a only contains "C", without any suffix.

Last edited by tcn (2025-10-07 09:01:01)

Offline

#6 2025-10-07 08:59:36

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,875

Re: invalid value for parameter "lc_messages": "C.UTF-8"

locale -a returns pretty much all locales, over 500.

What?

locale -a is supposed to list the generated locales only…

cat /etc/locale.gen | curl -F 'file=@-' 0x0.st

locale-archive is reasonably sized and recent-ish (no updates since august 7/8?) and unlike /usr/lib/locale/C.utf8,  /usr/lib/locale/C.UTF8 does normally not exist, so that's fine, but you would want more than just LC_MESSAGES there, "locale-gen" somehow failed, so let's see the config (above command)

Offline

#7 2025-10-07 09:06:32

tcn
Member
Registered: 2011-09-30
Posts: 83

Re: invalid value for parameter "lc_messages": "C.UTF-8"

My initial post contained the contents of locale.gen:

en_US.UTF-8 UTF-8  
en_US ISO-8859-1  

locale-gen executes successfully:

# locale-gen
Generating locales...
  en_US.UTF-8... done
  en_US.ISO-8859-1... done
Generation complete.
# ls -l /usr/lib/locale/locale-archive
-rw-r--r-- 1 root root 4432944 Oct  7 11:02 /usr/lib/locale/locale-archive
# locale -a | wc -l
507

¯\_(ツ)_/¯

Offline

#8 2025-10-07 09:13:09

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,875

Re: invalid value for parameter "lc_messages": "C.UTF-8"

type locale
strace -f -o /tmp/locale.strace locale -a
cat /tmp/locale.strace | curl -F 'file=@-' 0x0.st

Offline

#9 2025-10-07 09:24:12

tcn
Member
Registered: 2011-09-30
Posts: 83

Re: invalid value for parameter "lc_messages": "C.UTF-8"

http://0x0.st/KuPj.txt

# type locale
locale is /usr/bin/locale
# locale --version | head -1
locale (GNU libc) 2.42

BTW:

# localectl list-locales | wc -l
150

You may have caught me lying -.- locale actually also contains en_DE and /etc/locale.conf de_DE. Didn't want to disclose my location but did so with the regenerated locale-archive timestamp anyways smile Didn't consider it important but maybe it's triggering some fallback that explains why locale -a lists all locales. Anyway, it used to work fine in the past.

It's a somewhat weird configuration I eventually came up to have a system in english but still have reasonable (sorry, folks but it's true) date and number formats...

# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=en_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=en_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=en_DE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Last edited by tcn (2025-10-07 11:31:55)

Offline

#10 2025-10-07 09:39:52

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,291

Re: invalid value for parameter "lc_messages": "C.UTF-8"

I agree about the time format, this is in my /etc/locale.conf .

LANG=en_US.UTF-8
LC_TIME=nl_NL.UTF-8

It works fine as long as you don't use Desktop Environment tooling to manage locale settings ..

Last edited by Lone_Wolf (2025-10-07 09:42:18)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#11 2025-10-07 13:49:15

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,875

Re: invalid value for parameter "lc_messages": "C.UTF-8"

What is "en_DE.UTF-8"? Is that in the "locale -a" list? There's  en_DK but I've never seen en_DE before.

Offline

#12 2025-10-07 15:30:19

tcn
Member
Registered: 2011-09-30
Posts: 83

Re: invalid value for parameter "lc_messages": "C.UTF-8"

# ls -ltr /usr/lib/locale/en_DE.utf8/
total 2924
-rw-r--r--   1 root root    3180 Jul 31 18:26 LC_TIME
-rw-r--r--   2 root root      51 Jul 31 18:26 LC_TELEPHONE
-rw-r--r-- 299 root root      34 Jul 31 18:26 LC_PAPER
-rw-r--r--  75 root root      54 Jul 31 18:26 LC_NUMERIC
-rw-r--r-- 138 root root      62 Jul 31 18:26 LC_NAME
-rw-r--r--   1 root root     290 Jul 31 18:26 LC_MONETARY
-rw-r--r-- 320 root root      23 Jul 31 18:26 LC_MEASUREMENT
-rw-r--r--   1 root root     364 Jul 31 18:26 LC_IDENTIFICATION
-rw-r--r-- 217 root root  367708 Jul 31 18:26 LC_CTYPE
-rw-r--r-- 195 root root 2586930 Jul 31 18:26 LC_COLLATE
-rw-r--r--   1 root root     150 Jul 31 18:26 LC_ADDRESS
drwxr-xr-x   1 root root      30 Aug  8 14:23 LC_MESSAGES/
#  paru -Qo /usr/lib/locale/en_DE.utf8/LC_TIME 
/usr/lib/locale/en_DK.utf8/LC_TIME is owned by glibc-locales 2.42+r3+gbc13db739377-1
# locale -a | grep en_DE
en_DE.utf8
# ls -ltr /usr/lib/locale/en_DE.utf8
lrwxrwxrwx root root 11 B Wed May 29 14:27:25 2024  /usr/lib/locale/en_DE.utf8 ⇒ en_DK.utf8/
# grep -Rh en_DE /etc/ | wc -l
0

Huh. maybe I created this symlink manually... -.-

Anyway, it's broken for a couple of weeks, maybe 2 months or so but certainly not since may 2024.

Last edited by tcn (2025-10-07 15:41:44)

Offline

#13 2025-10-07 15:34:49

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,875

Re: invalid value for parameter "lc_messages": "C.UTF-8"

paru -Qo /usr/lib/locale/en_DE.utf8/LC_TIME
/usr/lib/locale/en_DK.utf8/LC_TIME is owned

did you symlink this?
Do you have en_DE or en_DK uncommented in the locale.gen?

Since you've already located youself, post that file - and also remove that symlink and the en_DE locale LC entries. Somethings's fishy and this smells the most…

Offline

#14 2025-10-07 16:08:23

tcn
Member
Registered: 2011-09-30
Posts: 83

Re: invalid value for parameter "lc_messages": "C.UTF-8"

Symlink: probably, don't remember, but I guess so.

# grep -E '^[^#]' /etc/locale.gen
de_DE.UTF-8 UTF-8  
de_DE ISO-8859-1  
de_DE@euro ISO-8859-15  
en_US.UTF-8 UTF-8  
en_US ISO-8859-1  

According to the grep -Rh from my previous reply there's no en_DE anywhere in /etc/. I have no clue how I managed to end up with this configuration, right now -.- Best guess is the KDE system settings app, en_DE shows up there, plus:

# cat ~/.config/plasma-localerc                                                                                                                                                                                                                                                                                                                                                          [Formats]
LANG=en_US.UTF-8
LC_ADDRESS=en_DE.UTF-8
LC_MEASUREMENT=en_DE.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_PAPER=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_TIME=en_DE.UTF-8

Anyway, that file is also over a year old. It's not broken for so long:

# ls -lhtr /var/lib/postgres/data/ | tail -5
-rw------- 1 postgres postgres   48 Jul 31 08:42 postmaster.opts
drwx------ 1 postgres postgres  662 Jul 31 08:42 global
drwx------ 1 postgres postgres   76 Jul 31 08:42 pg_logical
drwx------ 1 postgres postgres   22 Jul 31 08:42 pg_stat
-rw------- 1 postgres postgres  30K Oct  7 10:54 postgresql.conf

I hate this locale shit fuckery....I just want english with proper dates and numbers... -.-

Last edited by tcn (2025-10-07 16:41:53)

Offline

#15 2025-10-07 17:05:36

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,875

Re: invalid value for parameter "lc_messages": "C.UTF-8"

Offline

#16 2025-10-07 17:12:19

tcn
Member
Registered: 2011-09-30
Posts: 83

Re: invalid value for parameter "lc_messages": "C.UTF-8"

Yes, see post #12. Had to for some reason I don't remember (hmm, the en_DK I symlinked to is in there, I think). Not the most recent version, yet, though, r3.

Last edited by tcn (2025-10-07 17:14:00)

Offline

#17 2025-10-07 17:28:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,063

Re: invalid value for parameter "lc_messages": "C.UTF-8"

Get rid of that package, regenerate your locale archive, delete plasma-localerc, set your locales in /etc/locale.conf, then let's see where we're at.

It's probably a partial update issue, if that package is out of date for some reason.

Last edited by Scimmia (2025-10-07 17:30:42)

Offline

Board footer

Powered by FluxBB