You are not logged in.

#1 2024-05-25 21:30:58

Ghost-Order
Member
Registered: 2019-12-18
Posts: 24

[SOLVED] locale error: cannot set LC_CTYPE, LC_MESSAGES and LC_ALL

I was trying to run rofi for the first time in an almost fresh Arch install (awesome wm, lightdm, and firefox installed)

rofi -show run

but I got

(process:5189): Rofi-WARNING **: 15:47:41.890: Failed to set locale.

So I checked my locales with the locale command and to my suprise I got:

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.UFT-8
LC_CTYPE="en_US.UFT-8"
LC_NUMERIC="en_US.UFT-8"
LC_TIME="en_US.UFT-8"
LC_COLLATE="en_US.UFT-8"
LC_MONETARY="en_US.UFT-8"
LC_MESSAGES="en_US.UFT-8"
LC_PAPER="en_US.UFT-8"
LC_NAME="en_US.UFT-8"
LC_ADDRESS="en_US.UFT-8"
LC_TELEPHONE="en_US.UFT-8"
LC_MEASUREMENT="en_US.UFT-8"
LC_IDENTIFICATION="en_US.UFT-8"
LC_ALL=

The first three lines made me worry about possible mistakes during the arch installation (although I really cared to follow the guide from the wiki very close), this is my /etc/locale.gen

en_US.UTF-8 UTF-8

then, as stated in the guide I ran

locale-gen

and then I added this line in /etc/locale.conf

LANG=en_US.UFT-8

I fail to see what I did wrong here so maybe the issue comes from another place, but I don't know where else to look.

These are other outputs that I found relevant in similar questions:

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.utf8
POSIX
en_US.utf8

localectl

System Locale: LANG=en_US.UFT-8
    VC Keymap: (unset)
   X11 Layout: (unset)

grep -v ^# /etc/locale.gen

en_US.UTF-8 UTF-8

Last edited by Ghost-Order (2024-05-25 21:58:00)

Offline

#2 2024-05-25 21:51:40

pdp8
Member
Registered: 2023-05-14
Posts: 5

Re: [SOLVED] locale error: cannot set LC_CTYPE, LC_MESSAGES and LC_ALL

and then I added this line in /etc/locale.conf

LANG=en_US.UFT-8

If this is really what you added, "en_US.UFT-8" is not a valid locale (should be "UTF" not "UFT")

Offline

#3 2024-05-25 21:52:34

espritlibre
Member
Registered: 2022-12-15
Posts: 138

Re: [SOLVED] locale error: cannot set LC_CTYPE, LC_MESSAGES and LC_ALL

check the correct spelling, it's "UTF" not "UFT"

Offline

#4 2024-05-25 21:57:11

Ghost-Order
Member
Registered: 2019-12-18
Posts: 24

Re: [SOLVED] locale error: cannot set LC_CTYPE, LC_MESSAGES and LC_ALL

Wow I'm so embarrassed, didn't realize about that typo, my bad, thank you for noticing it!

Last edited by Ghost-Order (2024-05-25 21:58:49)

Offline

Board footer

Powered by FluxBB