locale: Cannot set LC_CTYPE to default locale: No such file or directory on Ubuntu 12.04

Some other messages you might see:

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

This has got to be one of the most annoying problems. It occurs infrequently enough that I never can remember how I fixed it. And when you search for this on google, you find many incorrect solutions, or solutions that “work” but are really just hacks.

The problem is you are missing your language pack. The solution is to install it!

aptitude install language-pack-en

Thats it. Problem solved.

This entry was posted in Linux. Bookmark the permalink.

Comments are closed.