Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-17-2004, 01:28 AM
|
#1
|
LQ Newbie
Registered: Jul 2004
Location: Malta
Distribution: Fedora C2
Posts: 3
Rep:
|
locale: Cannot Set LC_ALL to default locale: No such file or directory.
Hi mates when i open up the console terminal i'm getting the following error:
locale: Cannot Set LC_ALL to default locale: No such file or directory.
I have tried using the command "locale" and as output i got the following:
[root@localhost root]# locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US
LC_CTYPE=en_US
LC_NUMERIC=mt_MT
LC_TIME=en_US
LC_COLLATE=en_US
LC_MONETARY=mt_MT
LC_MESSAGES=en_US
LC_PAPER=mt_MT
LC_NAME=mt_MT
LC_ADDRESS=mt_MT
LC_TELEPHONE=mt_MT
LC_MEASUREMENT=mt_MT
LC_IDENTIFICATION=mt_MT
LC_ALL=
I tried using LocaleDrake and now when i open the terminal the error doesn't show up, howeven when i issue commands the error appears, like for example when i login as root, or when i issue the command locale etc.
As you can see LC_ALL isn't set how can i assign it a value? I have read the manual page of locale but i didn't understood it a lot. Someone can give me ideas please? I am running Mandrake 10.
PS: from the research i have made, i tried setting the values using the command "set LC_ALL=C" and also "set LC_ALL=en_US" but none of them worked.
Regards
asym
|
|
|
Click here to see the post LQ members have rated as the most helpful post in this thread.
|
01-20-2006, 04:40 PM
|
#2
|
LQ Newbie
Registered: Jan 2006
Posts: 9
Rep:
|
I think that what you want to do is type:
export LC_ALL="en_US"
however i think it's not recommended to do this because it will override all your other locale settings. One thing you might try to avoid that is setting it to an empty string. In theory, that value is allowed to be empty which just tells your computer to use the settings above it.
export LC_ALL=""
i have no idea if that will work, but it's worth a shot.
|
|
2 members found this post helpful.
|
05-05-2006, 07:11 AM
|
#3
|
LQ Newbie
Registered: Aug 2004
Location: India
Distribution: Mandrake
Posts: 3
Rep:
|
export worked for me
Thanx the export command worked for me!!
Patred TheKnight
|
|
|
10-05-2007, 09:03 PM
|
#4
|
LQ Newbie
Registered: Aug 2006
Posts: 6
Rep:
|
locale bug?
If i use the "en_US.UTF-8" then I got this error
# 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_US.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=
If i use the "en_US" or "en_AU" then all things are good
# locale
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=
How to explain and correct this bug? Any help will welcome. Thank you
Last edited by vanchutr; 10-06-2007 at 04:42 AM.
|
|
|
10-06-2007, 02:59 PM
|
#5
|
Member
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510
Rep:
|
You probably miss the locale in UTF-8 encoding.
You can generate it for yourself:
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
(It's case sensitive as far as I remember, you actually have to use the resulting locale string literally.)
Check with locale -a the locale you actually got on your system.
|
|
0 members found this post helpful.
|
10-15-2007, 08:36 PM
|
#6
|
LQ Newbie
Registered: Aug 2006
Posts: 6
Rep:
|
Cannot set LC_ALL to default locale: No such file or directory
Thank you Su-Shee,
I'd folowed your instructions but nothing new.
With locale -a, I get this
Code:
# locale -a
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
en_AU
en_CA
en_DK
en_GB
en_NZ
en_PH
en_US
en_US.UTF-8
vi_VN
vi_VN.UTF-8
And this
Code:
# localedef -i en_US -c -f UTF-8 en_US.UTF-8
cannot open locale definition file `translit_neutral': No such file or directory
And this more
Code:
# localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
/usr/share/i18n/locales/en_US:7: non-symbolic character value should not be used
/usr/share/i18n/locales/en_US:8: non-symbolic character value should not be used
/usr/share/i18n/locales/en_US:9: non-symbolic character value should not be used
/usr/share/i18n/locales/en_US:11: non-symbolic character value should not be used
............. More and more same things
Should you give some more instructions
|
|
0 members found this post helpful.
|
02-07-2008, 09:17 PM
|
#7
|
Member
Registered: Mar 2005
Location: Oregon
Distribution: Debian, Ubuntu, Whatever
Posts: 32
Rep:
|
I was able to fix this by:
vim /etc/defaults/locale
deleteing the contents and adding LANG=en_US.UTF-8
Saved it and locale -a
|
|
0 members found this post helpful.
|
10-17-2011, 09:48 AM
|
#8
|
LQ Newbie
Registered: Oct 2011
Posts: 2
Rep: 
|
Solved in debian update with sudo locale-gen command
|
|
2 members found this post helpful.
|
05-22-2012, 02:54 AM
|
#9
|
LQ Newbie
Registered: Jan 2009
Posts: 2
Rep:
|
local locales
If you continue to get error messages like
Code:
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
..make sure that the locale you are using locally (as in on the machine that you use to connect to a remote host) is also available on the server.
In my case the default locale on my laptop was en_GB.UTF-8, but the server was using en_US.UTF-8 only. I solved this by adding en_GB.UTF-8 to /etc/default/locale (via "dpkg-reconfigure locales" on a Debian box).
It took me a while to figure this out.. 
|
|
3 members found this post helpful.
|
08-27-2012, 06:07 AM
|
#10
|
Senior Member
Registered: Dec 2008
Posts: 4,732
|
Code:
anisha@linux-y3pi:~> uname -a && cat /etc/issue
Linux linux-y3pi 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
Welcome to openSUSE 11.3 "Teal" - Kernel \r (\l).
I had upgraded (and then downgraded) the glibc, and therefore I was
facing the same errors while trying to run R, or simple C programs.
The solution for this situation is to install the package glibc-locale.
|
|
|
03-24-2013, 08:35 PM
|
#11
|
LQ Newbie
Registered: Mar 2013
Posts: 1
Rep: 
|
Quote:
Originally Posted by meinhard
If you continue to get error messages like
Code:
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
..make sure that the locale you are using locally (as in on the machine that you use to connect to a remote host) is also available on the server.
In my case the default locale on my laptop was en_GB.UTF-8, but the server was using en_US.UTF-8 only. I solved this by adding en_GB.UTF-8 to /etc/default/locale (via "dpkg-reconfigure locales" on a Debian box).
It took me a while to figure this out.. 
|
After so many searches, tests, (re)-compilations & configurations, finally, the perfect (and so simple) solution for me.
I find that kind of error msgs quite impossible to determine where the problem was.
I don't know how you figured that out, but well done and thanks for sharing it. 
|
|
|
10-24-2018, 05:54 PM
|
#12
|
LQ Newbie
Registered: Oct 2018
Posts: 2
Rep: 
|
LOCPATH environment variable
I managed to cause this myself when migrating home directory dot files to a new machine, and I failed to identify the cause for a while on account of searching files for LC_ and not LOC.
The ~/.bashrc file I copied had the following:
Code:
export LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale
(the particular value here was on account of prior experiments with GNU Guix on the old machine; but the relevant fact is simply that the environment variable was set to a now-invalid path.)
This resulted in the following error when running various programs:
Code:
Warning: locale not supported by C library, locale unchanged
And these errors when running 'locale':
Code:
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
Removing (or commenting out) the 'LOCPATH' line resolved my issues.
|
|
|
All times are GMT -5. The time now is 08:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|