Sunday, August 9, 2009

cannot set LC_CTYPE locale (gentoo)

Problem :

cannot set LC_CTYPE locale
environment variable LANG is fr_FR.utf8@euro
please check that your locale name is correct

Solution :

The problem is that LC_CTYPE was unknown.
In fact, you have to check that this variable value is correctly spell.
To do that, you can do : locale -a

Example :
$ locale -a

fr_FR fr_FR.iso88591

Next, you have to check in the configuration file :
On gentoo :
vi /etc/env.d/02locale

Example :
vi /etc/env.d/02locale


=> You must have LANG variable initializes with one of the result of the command : locale -a

If you want, you can also let every Linux user to configure their own variable.

vi ~/.bashrc

Example :
vi ~/.bashrc
export LANG="fr_FR.iso885915@euro"
export LC_ALL=C

No comments:

Post a Comment