locale: Cannot Set LC_ALL to default locale: No such file or directory.
Linux - GeneralThis 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.
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.
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.
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.
# 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
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
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).
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.
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 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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.