Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just tried to add an user to a group

$ adduser someuser sudo
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",
    LC_ALL = (unset),
    LC_PAPER = "pl_PL.UTF-8",
    LC_ADDRESS = "pl_PL.UTF-8",
    LC_MONETARY = "pl_PL.UTF-8",
    LC_NUMERIC = "pl_PL.UTF-8",
    LC_TELEPHONE = "pl_PL.UTF-8",
    LC_IDENTIFICATION = "pl_PL.UTF-8",
    LC_MEASUREMENT = "pl_PL.UTF-8",
    LC_TIME = "pl_PL.UTF-8",
    LC_NAME = "pl_PL.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Adding user `someuser' to group `sudo' ...
Adding user someuser to group sudo
Done.

What does this mean, what went wrong and how to eliminate the error?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

According to this post on UbuntuForums.org:

You need to pay attention to your error message and issue a command for your missing locale.

For example, this is the error I got:

Code:

perl: warning: Setting locale failed. perl: warning: 
Please check that your locale settings:
LANGUAGE = "en_CA:en",  
LC_ALL = (unset),
LANG = "en_CA"
are supported and installed on your system. 
perl: warning: Falling back to the standard locale ("C").

The LANG string is the one you need.

By the looks of your error message, this should work for you:

sudo locale-gen en_US en_US.UTF-8 pl_PL pl_PL.UTF-8
sudo dpkg-reconfigure locales

In retrospect, googling this error message reveals a lot of fixes; but very little in the way of "why" or "how" it is caused. I suspect it has something to do with users running multiple locales, which may exist in varying degrees of completeness. But I really don't have anything to base that on, other than:

  • I have never seen it on my own machines.
  • Users on my machines are configured to use only one locale.

Further references:

share|improve this answer
    
One thing is, I want to know how to solve the problem, but there is also another thing, I'd like to understand, what the warning means and what are the consequences: I added a user to a group in the way I've shown above. Was something misconfigured in result? –  Kalmar Mar 29 '13 at 17:50
    
Basically, the warning means that a user's locale is not properly configured. In this case, I don't think that anything bad was propogated as a result of your command. What is not clear (to me) is if the locale is an issue for your user, or the user you are trying to add. Just to be sure, check and fix the locales for both of them, and everything should be fine. –  BryceAtNetwork23 Apr 2 '13 at 16:31
add comment

Your Answer

 
discard

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.