http://qs1969.pair.com?node_id=567684

abachus has asked for the wisdom of the Perl Monks concerning the following question:

Hello there,

I'm getting the following error each time i run Perl :

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_COLLATE = "C",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

After that output on STDERR, Perl runs as normal. I'm not sure what caused this and how can I stop this happening ? To me it would suggest a lack of a few environment variables, sure enough I don't see them when looking at the such variables. But what should I be setting them too ? By the way its a slackware linux box.

thanks,

Isaac.

Replies are listed 'Best First'.
Re: Error when running perl.
by theorbtwo (Prior) on Aug 16, 2006 at 13:57 UTC

    The problem is more the oppisite -- you've got too many environment variables set. Removing LANG="en_US" from your environment will probably remove the error message. Contrarywise, install the package with locale information in it on your system.

Re: Error when running perl.
by jdtoronto (Prior) on Aug 16, 2006 at 14:10 UTC
    abachus

    theorbtwo may well be correct. I will merely add my own observtion that back in the 5.6.0/5.6.1 days we had this happen and we simply re-built Perl using the libraries on the machine and all the problems were fixed.

    jdtoronto

      Thanks guys, yes if I remove the LANG variable (or set it to nothing) the problem has gone :)
      Won't need to compile Perl then, although that is oddly enough quite a lot of fun.

      Its probably to do with a change i've made when setting up user accounts. I'd best check out /etc/skel and profile etc.

      Isaac