Saturday, March 02, 2013

Annoying "perl: warning: Setting locale failed"

This post shows a simple way of removing this annoying warning when running perl in linux.

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


on your home directory:

1. Edit your user bash_profile

vi .bash_profile

2. Insert the following:

export LANGUAGE=en_US.UTF-8

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

3. Rerun your Bash Profile

. ~/.bash_profile 

Hope this helps.


srini said...

Great post thanks,
for csh shell user below env in .cshrc file

setenv LANG en_US.UTF-8
setenv LC_ALL en_US.UTF-8
setenv LANGUAGE en_US.UTF-8

vasudha dharani said...

Perl online training|Perl training|call us+919000444287 ...
Perl Online Training, Perl Scripting online training by real time Experts from Hyderabad, India. Call 9000444287 for online training demo. Online Perl training ...

Rubén Rivero Capriles said...

great thanks so much for your useful, clear and easy explanation.

derrick said...

no worries!

Ivan Eduardo Cabrera Godinez said...

Thank you so much.