coderholic

Missing locale problems in Linux

I've recently been doing some work on a Debian server and was running into some errors when using Subversion

 ~$ svn svn: warning: cannot set LC_CTYPE locale svn: warning: environment variable LC_CTYPE is en_US.UTF-8 svn: warning: please check that your locale name is correct Type 'svn help' for usage.

The error message tells me that the problem is a missing en_US.UTF-8 locale. I didn't have root access on this server, so I wasn't able to install any new locales. Luckily there is a command that prints out all available locales

 ~$ locale -a 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_COLLATE to default locale: No such file or directory C POSIX en_US en_US.iso88591

Switching my environment variables to en_US.iso88591 fixed the issue.

~$ LC_CTYPE="en_US.iso88591" ~$ LC_MESSAGE="en_US.iso88591" ~$ LC_ALL="en_US.iso88591"

I also added those three lines to my bash_profile so I won't need to do it again next time I log in.

Posted on 27 Mar 2008
If you enjoyed reading this post you might want to follow @coderholic on twitter or browse though the full blog archive.