HomeCpanelSetting locale failed

Setting locale failed

Ever seen the below error in cPanel servers while running a script?

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").

The solution is simple! Login via SSH as root and type the below commands:

# locale-gen en_US en_US.UTF-8 hu_HU hu_HU.UTF-8
# dpkg-reconfigure locales

This should fix it!

Scroll to Top