You are not logged in.

#1 2025-07-25 09:57:24

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Can't fix error: "man: can't set the locale; make sure $LC_* and $LAN"

I am using Arch Linux with the KDE desktop environment, and I noticed today that when I use the `man` command, after exiting the manual, I see an error: "man: can't set the locale; make sure $LC_* and $LANG are correct". I read https://wiki.archlinux.org/title/Locale and did everything as instructed there. I can't figure out how to fix this.
The output of `locale`:

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_IL.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=

The output of `locale -a`:

C
C.utf8
en_US.utf8
POSIX

In `/etc/locale.gen`, the only uncommented line is "en_US.UTF-8 UTF-8". The contents of `/etc/locale.conf` are: "LANG=en_US.UTF-8". I already ran `sudo locale-gen` and it completed without error. I also use the fish shell, but my config has nothing that sets LANG or any LC_ variable. Can somebody help me understand what's going on?

Offline

#2 2025-07-25 10:37:54

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 714

Re: Can't fix error: "man: can't set the locale; make sure $LC_* and $LAN"

ShaiAvr wrote:
LC_TIME=en_IL.UTF-8
ShaiAvr wrote:

I am using Arch Linux with the KDE desktop environment

Did you try following the KDE specific instructions in https://wiki.archlinux.org/title/Locale … g_language ?

Offline

#3 2025-07-25 11:44:11

ShaiAvr
Member
From: Israel
Registered: 2025-03-30
Posts: 40

Re: Can't fix error: "man: can't set the locale; make sure $LC_* and $LAN"

Removing this file worked. However, I live in Israel, so shouldn't I be using `en_IL.UTF-8`?

Offline

#4 2025-07-25 11:52:10

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

Re: Can't fix error: "man: can't set the locale; make sure $LC_* and $LAN"

If you want to use it, you have to have generated it. https://wiki.archlinux.org/title/Instal … calization

Offline

Board footer

Powered by FluxBB