LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-27-2007, 01:50 AM   #1
evaristegalois
Member
 
Registered: Sep 2006
Distribution: Ubuntu 14.04
Posts: 41

Rep: Reputation: 15
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
 
Old 06-04-2007, 08:42 PM   #2
warren1715
LQ Newbie
 
Registered: Mar 2004
Location: Alabama
Distribution: OpenSuse 15.4
Posts: 9

Rep: Reputation: 3
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

 
Old 06-09-2007, 12:51 AM   #3
evaristegalois
Member
 
Registered: Sep 2006
Distribution: Ubuntu 14.04
Posts: 41

Original Poster
Rep: Reputation: 15
No such program for Ubuntu. Any other tips?
 
Old 06-09-2007, 08:46 PM   #4
warren1715
LQ Newbie
 
Registered: Mar 2004
Location: Alabama
Distribution: OpenSuse 15.4
Posts: 9

Rep: Reputation: 3
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
locale: Cannot Set LC_ALL to default locale: No such file or directory. asym Linux - General 11 10-24-2018 05:54 PM
How to change the locale by setting the system default locale letdoit Slackware 6 08-18-2011 03:34 AM
locale: Cannot set LC_ALL to default locale: Invalid argument GadgetWiz Mandriva 1 03-31-2006 11:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration