Digital Tumbleweed

Programming, business, and other such non-sense.
spacer
Nick Campbell


Search

Tags

  • nodejs (2)
  • ubuntu (2)
  • ctype (1)
  • events (1)
  • karmic (1)
  • kubuntu (1)
  • linux (1)
  • locales (1)
  • npm (1)
  • perl (1)
  • View all 13 tags

Get Updates

Subscribe via RSS »

Me Links

on Twitter

on Github

on LinkedIn

spacer

Other Links

spacer
  • Edit
  • Delete
  • Tags
  • Autopost
 

Locales and LC_CTYPE

Recently I added another slice to my list of servers but whenever I add slices on Slicehost with Ubuntu, they come with the locale problem. You might recognize it. The following shows up in almost ever source compile you do (frustration mounts):

spacer

 

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "en_US.UTF-8", LANG = "en_US.UTF-8" 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_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory

 

Then, after reading the error you see that it doesn't even have en_US installed! *GRAH* Well, there is a simple solution. In my case I use en_US, but if you use something different then make sure you specify it.

cd /usr/share/locales
sudo ./install-language-pack en_US
sudo dpkg-reconfigure locales

 

This should fix the problem. To see what your system is set to use, you can do the following: locale

It will spit out something like this:

 

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=

 

Hope it helps.

Tweet
Posted

0 Comments

Theme by Cory Watilo.
More great Posterous themes at themes.posterous.com.
spacer
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.