Often when running Perl you will see error messages like this:
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
The error message you're seeing is related to the configuration of locale settings on your Unix/Linux system. Locale settings determine the language and regional settings for your applications, affecting things like date formats, the first day of the week, and character encoding. The error indicates that Perl is unable to use the specified locale settings because they are not properly configured or installed on your system.
The step to resolve the issue is done by setting environment variables in your shell profile file (e.g., .bash_profile, .bashrc, .zshrc, etc.).
export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8
After adding these lines, you will need to log out and log back in for the changes to take effect, or you can source the profile file directly using a command like source ~/.bashrc.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article