LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   locale problem (https://www.linuxquestions.org/questions/linux-newbie-8/locale-problem-556971/)

evaristegalois 05-27-2007 01:50 AM

locale problem
 
Here is my problem: I run Ubuntu and haven't ever had any trouble with locales. Then I installed a program offline by downloading a *.deb file. Since then I get this error message every time I touch the command line:

cannot set lc_all to default locale: no such file or directory

When I try to run a perl program it flings the following error message at me:

perl: warning: setting locale failed

Anything that uses Gtk also complains about this problem, and as a consequence some of my programs have quit working altogether. Other users seem to have the same problem but even though there are numerous forum questions about this issue I have not come across an intelligent answer and advice on how to fix it anywhere. Here are the different forum entries:

http://www.linuxquestions.org/questi...d.php?t=218622
http://www.linuxquestions.org/questi...d.php?t=419024
http://www.linuxquestions.org/questi...d.php?t=188628
http://ubuntuforums.org/showthread.php?t=431178
http://ubuntuforums.org/showthread.php?t=138022
http://ubuntuforums.org/showthread.php?t=319397


These are all different users asking the same question, some of whose problems are solved by

Quote:

dpkg -reconfigure locales
or

Quote:

locale-gen
None of the methods suggested worked for me as well as some of the others who had the same problem.

Here is the output of the command locale:

Quote:

LANG=en_CA.UTF-8
LANGUAGE=en_CA:en
LC_CTYPE="en_CA.UTF-8"
LC_NUMERIC="en_CA.UTF-8"
LC_TIME="en_CA.UTF-8"
LC_COLLATE="en_CA.UTF-8"
LC_MONETARY="en_CA.UTF-8"
LC_MESSAGES="en_CA.UTF-8"
LC_PAPER="en_CA.UTF-8"
LC_NAME="en_CA.UTF-8"
LC_ADDRESS="en_CA.UTF-8"
LC_TELEPHONE="en_CA.UTF-8"
LC_MEASUREMENT="en_CA.UTF-8"
LC_IDENTIFICATION="en_CA.UTF-8"
LC_ALL=

(CA stands for Canada and shouldn't make a difference. When I run locale-gen the en_CA.UTF-8 is one of the locales indicated as up-to-date.)

Here is /etc/environment:

Quote:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games"
LANG="en_CA.UTF-8"
LANGUAGE="en_CA:en"
Here are the files in /usr/lib/locale:

en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8

I am just afraid I have to reinstall the whole system if I can't fix this one. It seems to be a problem bugging a lot of people and I haven't seen a satisfactory solution.

--evaristegalois

warren1715 06-04-2007 08:42 PM

I had that problem in Mandriva.
to fix it i had to install glibc-i18ndata.

then as root do:

localedef -i en_US -f ISO-8859-1 en_US

:)

evaristegalois 06-09-2007 12:51 AM

No such program for Ubuntu. Any other tips?

warren1715 06-09-2007 08:46 PM

I believe Ubuntu linux has the locale-gen command.

the default is:
locale-gen en_US.UTF-8

for help try
man locale-gen

http://linuxquestions.cachefly.net/i...ilies/wink.gif


All times are GMT -5. The time now is 03:24 PM.