You are not logged in.

#1 2010-12-18 17:18:21

Archie_Enthusiasm
Member
Registered: 2010-10-23
Posts: 99

[SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

Hi guys,

I use zsh as my shell. Whenever I open a manual for an application by doing:

man `the name of the application`

it always says "man: can't set the locale; make sure $LC_* and $LANG are correct". I actually set the locale in my .zshrc file as you can see below:

# locales
export LC_ALL=""
export LC_COLLATE=C
export LANG=en_EN.UTF-8

So my question is why this is happening? Is my locales configuration wrong? I have US ENglish as my language option both for my arch OS and all the apps running on it.

Thanks

Last edited by Archie_Enthusiasm (2010-12-20 23:46:00)

Offline

#2 2010-12-18 17:57:53

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

paste the output of locale and locale -a


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2010-12-19 20:12:29

Archie_Enthusiasm
Member
Registered: 2010-10-23
Posts: 99

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

Hi guys,

sorry for responding too late.

> 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_EN.UTF-8
LC_CTYPE="en_EN.UTF-8"
LC_NUMERIC="en_EN.UTF-8"
LC_TIME="en_EN.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_EN.UTF-8"
LC_MESSAGES="en_EN.UTF-8"
LC_PAPER="en_EN.UTF-8"
LC_NAME="en_EN.UTF-8"
LC_ADDRESS="en_EN.UTF-8"
LC_TELEPHONE="en_EN.UTF-8"
LC_MEASUREMENT="en_EN.UTF-8"
LC_IDENTIFICATION="en_EN.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
C
POSIX
en_US
en_US.iso88591
en_US.utf8

Offline

#4 2010-12-19 20:58:46

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

https://wiki.archlinux.org/index.php/Locale

Check wiki, see if anything helps...


Mr Green

Offline

#5 2010-12-19 22:01:52

Archie_Enthusiasm
Member
Registered: 2010-10-23
Posts: 99

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

Yes,
I have already seen the wiki.

In my rc.conf I also have the default locale en_US.UTF-8.

> cat /etc/rc.conf | grep LOCALE
# LOCALE: available languages can be listed with the 'locale -a' command
LOCALE="en_US.UTF-8"


What I do not understand is where this locale command tries to find a file:

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

No such file or directory? Is there a file named LC_CTYPE or what? I do not understand how this locale stuff works.

I also have the following in my .zshrc file.

# locales
export LC_ALL=""
export LC_COLLATE=C
export LANG=en_EN.UTF-8

Offline

#6 2010-12-19 22:59:38

llawwehttam
Member
From: United Kingdom
Registered: 2010-01-19
Posts: 181

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

Have you run

sudo locale-gen

?

Offline

#7 2010-12-20 13:36:05

Archie_Enthusiasm
Member
Registered: 2010-10-23
Posts: 99

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

I have run it.

It just completes as it should. But I am still getting the same error.

> man locale
man: can't set the locale; make sure $LC_* and $LANG are correct

This "man" somehow can not set the locale. I think it is nothing to do with the system configuration. this is only this specific command program. When I change from zsh to bash and then execute for example "man locale", it also gives the same error.

Offline

#8 2010-12-20 14:00:53

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

have you got anything in autostart.sh?


Mr Green

Offline

#9 2010-12-20 15:33:55

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

Archie_Enthusiasm wrote:

Hi guys,

sorry for responding too late.

> 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_EN.UTF-8
LC_CTYPE="en_EN.UTF-8"
LC_NUMERIC="en_EN.UTF-8"
LC_TIME="en_EN.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_EN.UTF-8"
LC_MESSAGES="en_EN.UTF-8"
LC_PAPER="en_EN.UTF-8"
LC_NAME="en_EN.UTF-8"
LC_ADDRESS="en_EN.UTF-8"
LC_TELEPHONE="en_EN.UTF-8"
LC_MEASUREMENT="en_EN.UTF-8"
LC_IDENTIFICATION="en_EN.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
C
POSIX
en_US
en_US.iso88591
en_US.utf8

en_EN is not a valid locale. Set it to en_US or en_GB instead.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2010-12-20 20:56:52

Archie_Enthusiasm
Member
Registered: 2010-10-23
Posts: 99

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

Now I have this in my rc.conf file. (I commented out the old one and set the locale as you suggested to en_US)

LOCALE="en_US"
#LOCALE="en_EN.UTF-8"

I also generated the locale again :

> sudo locale-gen
Password:
Generating locales...
  en_US.UTF-8... done
  en_US.ISO-8859-1... done
Generation complete.

Now the output of locale and locale -a are:

> 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_EN.UTF-8
LC_CTYPE="en_EN.UTF-8"
LC_NUMERIC="en_EN.UTF-8"
LC_TIME="en_EN.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_EN.UTF-8"
LC_MESSAGES="en_EN.UTF-8"
LC_PAPER="en_EN.UTF-8"
LC_NAME="en_EN.UTF-8"
LC_ADDRESS="en_EN.UTF-8"
LC_TELEPHONE="en_EN.UTF-8"
LC_MEASUREMENT="en_EN.UTF-8"
LC_IDENTIFICATION="en_EN.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
C
POSIX
en_US
en_US.iso88591
en_US.utf8

What i have in my .zshrc file is the following:

# locales
export LC_ALL=""
export LC_COLLATE=C
export LANG=en_EN.UTF-8

But it still does not work. You meant that I should change the locale value in rc.conf file to en_US right?

Offline

#11 2010-12-20 21:08:24

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

reboot or export the locale by hand. Editing rc.conf doesn't make it change by magic.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#12 2017-04-12 19:38:22

stryitg
Member
Registered: 2017-04-12
Posts: 1

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre

Hi,

export LANG=C
made it for me

Offline

#13 2017-04-12 19:48:38

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: [SOLVED]man: can't set the locale; make sure $LC_* and $LANG are corre


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB