Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = "ru_UA.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

What do I do with this? I get it in almost every package I install.

share|improve this question

You need to run the following command:

dpkg-reconfigure locales

Select the locale(s) you want to have on your system (based on your post, you probably want ru_UA.UTF8 to be selected). On the next screen, give the default locale you wish to use.

share|improve this answer
I did that. I actually want en_US but the sys admins installed ru_UA. Anyway. I deselected everything but en_US and made the default en_US. through the command you stated. BUT after I reboot the system the same old problem is back again. How do I get it working after a system reboot? – aco Jul 5 '12 at 20:44
And I also get this everytime I log into the terminal -bash: warning: setlocale: LC_ALL: cannot change locale (ru_UA.UTF-8): No such file or directory – aco Jul 5 '12 at 20:50
You don't have some locale settings in you rc files (.bash_profile, .bashrc, or similar), do you? The system default locale settings can be overridden by exporting the LC_* variables, most notably LC_ALL, which, if set, acts as a "user default" locale setting. Check the output of the locale command. Usually, if LC_ALL is empty, but all the others (except for LANG and LANGUAGE, both of which can be empty) are set, then the system default settings are in place. If LC_ALL is set, then the locale settings got overridden. – Lacek Jul 6 '12 at 9:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.