Contact SalesSitemapCustomer Login

Go Back   VPSlink Forums > Operating Systems > Ubuntu

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-27-2006, 01:44 AM
Junior Member
 
Join Date: Jul 2006
Posts: 6
Default Locale Issues

This is the third account with you guys that has had this issue and its quite confusing to me that no one else has had these problems, since I've found them to be quite repeatable.

0) Fresh install!

1) Install anything with the perl libraries.

2) Get this error from apt-get or almost anything that might possibly use any perl anywhere (nearly anything)

$ locale
locale
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
LANG=en_US
LANGUAGE=en_GB:en_US:en
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=en_US

Everything seems to be quite upset about the locale.

I did sudo apt-get install trac.

Now when I try and run tracd I get this.

$ tracd
Traceback (most recent call last):
File "/usr/bin/tracd", line 102, in ?
main()
File "/usr/bin/tracd", line 50, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python2.4/locale.py", line 381, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

So, everything is unhappy. Things seem to work (except trac) but they all complain like hell!

Any ideas?

-hampton.

PS: I did install language-pack-en
Reply With Quote
  #2 (permalink)  
Old 07-27-2006, 09:46 PM
Former Employee
 
Join Date: Jun 2006
Posts: 74
Default

Could you open a support ticket?

Thank you
Reply With Quote
  #3 (permalink)  
Old 08-04-2006, 07:03 PM
Junior Member
 
Join Date: Aug 2006
Posts: 12
Default

I encountered this problem. Here are my notes on the fix:

I get locale errors on apt-get and other programs:
Setting up perl (5.8.7-10ubuntu1) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

This was solved (see http://www.ubuntuforums.org/showthread.php?t=159177) with:
locale-gen en_US
locale-gen en_US.UTF-8
Reply With Quote
  #4 (permalink)  
Old 08-25-2006, 10:49 PM
Junior Member
 
Join Date: Aug 2006
Posts: 18
Default localedef

Try the following commands:
sudo apt-get install localeconf
sudo localedef -i en_US -c -f UTF-8 en_US.UTF-8
Reply With Quote
  #5 (permalink)  
Old 09-03-2007, 02:58 AM
Junior Member
 
Join Date: Aug 2006
Posts: 18
Default

Gosh,

I solved this including compiling locale from source and gdb the machine code in libc. This fails somewhere in the shared libraries, it is not locale and it is not the compiled locale data. A fresh ubuntu 6.06 install works, so it is likely some problem in vpslink's Ubuntu image, or a bug in Ubuntu itself. LC_COLLATE fails for non-default locales.

Here is how to fix it!!!!

# edit /etc/environment
<make sure there is a line LANG=C>
# runlevel # just check there should be a 2 given
# init 2 # switch from runlevel 2 to runlevel 2, ie. reload /etc/environment
<login again>
# locale
## should not give error message, just a bunch of LC_*="C"
# perl -version
## should not give an error message, just perl version information

Spent two days on this one...

Regards,

Harald Rudell
Reply With Quote
  #6 (permalink)  
Old 02-06-2008, 11:09 PM
Junior Member
 
Join Date: Nov 2007
Posts: 9
Default

Maybe this should go in a wiki here at vpslink? This problem still exists in the current image of ubuntu 7.10 gutsy.

braddock referenced this solution:

locale-gen en_US
locale-gen en_US.UTF-8

combine with:

locale -a (lists all available locales)
export LC_ALL=en_US.UTF-8 (capitalization and spacing matters)
dpkg-reconfigure locales

BTW, what used to be tzconfig in ubuntu is now tzselect or dpkg-reconfigure tzdata (to select your timezone)
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT. The time now is 02:58 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0