Q:

Locale warning while executing adduser

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?

A:

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:

installArchives() failed: perl: warning: Setting locale failed.
https://help.ubuntu.com/community/Locale

