Tactical Technical Strike

Musings, Thoughts, Notes, & a brain dump of what I come across

Why’s my cloud server broken? Basic fix for your Ubuntu rackspace cloud server

Posted on | April 6, 2010 | No Comments

Ever used a Rackspace cloud hosted, Ubuntu based cloud server? That’s right, i’m sure 3 or 4 of you at least. Well, here’s a pesky problem that bothered me for a while that I finally got around to looking up how to fix: “The bad locale error.”

The Setup: When using APT on the server, you are constantly met with an error describing how your language and locale are not set up correctly. This can also pop up when using other perl programs and scripts, but APT is likely where you saw it first. For me, it looks something like:

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”).
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

Well, weird, because as you can see, the lang is clearly set, and you think that would be enough to quell any warnings. Not in this case. This error can also be easily reproduced by asking for the current version of perl from the command line ($> perl -v).

The Fix:
Very basic actually, turns out that the system is just missing a few of the locale files. Looks like they installed the languages but not the other localization pieces. Easy to fix, just install the full language pack for your chosen language (for me, english or en). I did this by just doing a quick apt-get for the full package ($> apt-get install language-pack-en-base). That’s it, problems fixed. I never found a true issue caused by this, but it did have a habit of filling log files with clutter. Better to fix issues, however minor, before they have some cascading result down the road in my opinion.

[1] Rackspace Cloud Servers
[2] Ubuntu – Repairing Perl Locale Errors


  • Links, feeds, and all the other info that I need to be fully self-indulgent, shared, and organized. These links and widgets are subject to change.