LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 09-28-2009, 07:40 PM   #1
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Rep: Reputation: 32
Failed to set locale, defaulting to C


I just got fresh install of centos 64bit version,and i got that strange message every time when i do something with yum.
But with rpm there is even more problems:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "e_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "e_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Operating system is CentOS Linux
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "e_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
I was installing webmin rpm and seems it's not working beacuse of this.
Any idea how to fix this?I saw somewhere how it need to be reinstalled glibc-common,so i did first rpm -e --nodeps glibc-common then yum install glibc-common but that didn't help,still same.
Any idea?

Last edited by centosfan; 09-28-2009 at 08:03 PM.
 
Old 09-28-2009, 08:19 PM   #2
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 263

Rep: Reputation: 59
I've never seen e_US. Out of curiosity, would you try

LC_CTYPE=en_US yum <whatever_command>
 
Old 09-28-2009, 08:25 PM   #3
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by scottro11 View Post
I've never seen e_US. Out of curiosity, would you try

LC_CTYPE=en_US yum <whatever_command>
LC_CTYPE=en_US yum install p
Same effect.Somehow i have feeling only solution would be os reinstall.
 
Old 09-28-2009, 08:48 PM   #4
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 263

Rep: Reputation: 59
Hrrm, this is odd. Ok, try this one. (And then I'll stop wasting your time.)

locale -a |grep US

See what comes up and try with something like en_US.utf8 and maybe even en_US.UTF8 or UTF-8.

lastly, see if there are available upgrades for yum, python, and rpm.

Does the error prevent yum from working?
 
Old 09-28-2009, 08:50 PM   #5
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 263

Rep: Reputation: 59
Ooops, I see I missed one thing. Instead of LC_CTYPE, try it with LANG, that is

LANG=en_US yum <whatver>.
 
Old 09-28-2009, 08:53 PM   #6
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by scottro11 View Post
Ooops, I see I missed one thing. Instead of LC_CTYPE, try it with LANG, that is

LANG=en_US yum <whatver>.
Yes that working.But how to make it work normally,i mean don't tell me now i with every yum and rpm operation i need to type LANG=en_US before?
 
Old 09-28-2009, 08:55 PM   #7
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by scottro11 View Post
Hrrm, this is odd. Ok, try this one. (And then I'll stop wasting your time.)

locale -a |grep US

See what comes up and try with something like en_US.utf8 and maybe even en_US.UTF8 or UTF-8.

lastly, see if there are available upgrades for yum, python, and rpm.

Does the error prevent yum from working?
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_COLLATE to default locale: No such file or directory
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
es_US
es_US.iso88591
es_US.utf8
yi_US
yi_US.cp1255
yi_US.utf8
Yum and rpm works fine but it seems that error slowing down them.
 
Old 09-28-2009, 09:02 PM   #8
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 263

Rep: Reputation: 59
Well, you could deal with the LANG issue by setting it in your .bash_profile.

export LANG=en_US

Sounds like locales are missing.

yum provides */locale

gives me glibc-common among other things. I"m a bit stuck.

Hrrm filesystem is another one, but I'm almost certain you'd have that installed.

I don't know, it does sound as if something got a bit broken. Maybe reinstalling perl? (That's a stab in the dark and probably a waste of time.)
 
Old 09-30-2009, 11:26 AM   #9
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by scottro11 View Post
Well, you could deal with the LANG issue by setting it in your .bash_profile.

export LANG=en_US

Sounds like locales are missing.

yum provides */locale

gives me glibc-common among other things. I"m a bit stuck.

Hrrm filesystem is another one, but I'm almost certain you'd have that installed.

I don't know, it does sound as if something got a bit broken. Maybe reinstalling perl? (That's a stab in the dark and probably a waste of time.)
Seems command export LANG=en_US works.Toobad when i was checking your post my brain was not function properly since it was late night and i didn't realized i was only need to type export LANG=en_US for making it work,which extended time spended on this problem for several hours until i checked this thread again.
 
Old 09-30-2009, 09:26 PM   #10
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 263

Rep: Reputation: 59
Been there, done that, got the t-shirt AND the CD. It's like looking at a config file with a typo when you're tired. Look at it the next day, and it's "How the HECK could I have missed that?"
 
Old 10-01-2009, 12:49 PM   #11
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Actually seems this works only per session(when i reconnect error appear again)Any idea to make this permanent?
 
Old 10-05-2009, 07:24 PM   #12
centosfan
Member
 
Registered: Jun 2003
Location: Golem city
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219

Original Poster
Rep: Reputation: 32
Silly me again,i was just need to add export LANG=en_US to bash profile to make it work permanently.
 
Old 08-23-2012, 07:10 AM   #13
longst
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by centosfan View Post
Silly me again,i was just need to add export LANG=en_US to bash profile to make it work permanently.
I tried to put
export LANG=en_US
into .bash_profile

at moment, my .bash_profile looks like

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
export LANG=en_US

But still I have this error
 
  


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 On
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
"locale not supported by Xlib, locale set to C" Irad Linux - Software 3 06-25-2006 03:59 PM
locale: Cannot set LC_ALL to default locale: Invalid argument GadgetWiz Mandriva 1 03-31-2006 11:38 PM
Setting locale failed linx win Debian 1 04-02-2005 09:46 AM
Setting locale failed?? calculon Linux - General 1 12-04-2001 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:56 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