LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-06-2012, 05:44 AM   #1
boofhead
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
"Cannot set LC_CTYPE to default locale: No such file or directory"


I'm having trouble getting locales to work on this Debian 5 server.

If I go:
Code:
# LC_ALL=POSIX
# locale
LANG=POSIX
LANGUAGE=POSIX
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=POSIX
All seems to be fine, however:
Code:
# LC_ALL=en_US.UTF-8
# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=POSIX
LANGUAGE=POSIX
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=en_US.UTF-8
throws the error.

Things I've tried:
Code:
# locale-gen
Generating locales (this might take a while)...
  en_US.ISO-8859-1... done
  en_US.UTF-8... done
Generation complete.
Code:
# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
C
C.UTF-8
en_US
en_US.iso88591
en_US.utf8
POSIX
Code:
# dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "POSIX",
        LC_ALL = "en_US.UTF-8",
        LANG = "POSIX"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/sbin/dpkg-reconfigure: locales is broken or not fully installed
Code:
# LC_ALL=POSIX
# dpkg-reconfigure --force locales
(after setting en_US.UTF-8 as the default)
Generating locales (this might take a while)...
  en_US.ISO-8859-1... done
  en_US.UTF-8... done
Generation complete.
*** update-locale: Error: invalid locale settings:  LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
Code:
# cd /usr/share/i18n/locales
# localedef -f UTF-8 -i en_US en_US.UTF-8
Code:
# cd /usr/share/i18n/locales
# localedef -v -c -f UTF-8 -i en_US en_US.UTF-8
(spits out a lot of stuff)
Have tried installing locales-all, to no avail.

Have tried with another locale (en_GB.UTF-8 and en_GB.ISO-8859-1) but both spit out the same errors.
Have tried doing a search for filenames containing "utf" and "en_US" on another Debian server which doesn't have these issues, but can't see any obvious missing files. The only difference I can see is "UTF-8" vs "utf8" between the two (but "utf8" won't work here either).

Oh, and if this helps:
Code:
# validlocale en_US.utf8
locale 'en_US.utf8' not available
en_US.utf8 utf8
# validlocale en_US.UTF-8
locale 'en_US.UTF-8' not available
en_US.UTF-8 UTF-8
# validlocale en_US
locale 'en_US' not available
en_US ISO-8859-1
# validlocale en_US.ISO-8859-1
locale 'en_US.ISO-8859-1' not available
en_US.ISO-8859-1 ISO-8859-1
# validlocale POSIX
locale 'POSIX' valid and available
Does anyone have any idea on how I can fix this?
Thanks!

Last edited by boofhead; 02-06-2012 at 06:29 AM.
 
Old 02-06-2012, 07:57 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
You have glibc-i18n package installed ?

(edit)
locale en_US.utf8 files should have been installed with glibc package though

Last edited by Cedrik; 02-06-2012 at 08:00 AM.
 
Old 02-06-2012, 08:10 PM   #3
boofhead
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Couldn't find that package, but thanks a lot for the pointer Cedrik!
Turned out to be broken libc6 - didn't even think that was related.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10 03-24-2013 08:35 PM
[SOLVED] Errors executing shell script: "command not found" and "no such file or directory" eko000 Linux - Newbie 1 01-14-2011 07:54 AM
Getting this error "Unable to set LC_ALL to default locale" Nabeel Mandriva 3 12-16-2009 04:33 AM
Cannot set LC_CTYPE to default locale: judaB Debian 2 04-16-2007 05:15 AM
"locale not supported by Xlib, locale set to C" Irad Linux - Software 3 06-25-2006 03:59 PM


All times are GMT -5. The time now is 08:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration