I have been getting this error while restarting Nagios and I have quite ignored it for some time until when I needed to install some nagios plugins which made me to look for a solution out there for this problem.
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
Finally I was able to fix it with this simple solution.
$ locale-gen en_US en_US.UTF-8 hu_HU hu_HU.UTF-8
$ dpkg-reconfigure locales