Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: perl: warning: Setting locale failed.

  1. #11
    Join Date
    Apr 2011
    Beans
    2

    Re: perl: warning: Setting locale failed.

    gee, thanks!

  2. #12
    Join Date
    Apr 2006
    Beans
    Hidden!

    Re: perl: warning: Setting locale failed.

    Quote Originally Posted by demauk View Post
    You need to pay attention to your error message and issue a command for your missing locale.

    For example, this is the error I got:

    Code:
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    	LANGUAGE = "en_CA:en",
    	LC_ALL = (unset),
    	LANG = "en_CA"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    The LANG string is the one you need. So, in my case this command solved my problem:

    Code:
    $ sudo locale-gen en_CA
    THIS.

    Thank you.

  3. #13
    Join Date
    Jun 2011
    Beans
    3

    Re: perl: warning: Setting locale failed.

    Quote Originally Posted by demauk View Post
    You need to pay attention to your error message and issue a command for your missing locale.

    For example, this is the error I got:

    Code:
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    	LANGUAGE = "en_CA:en",
    	LC_ALL = (unset),
    	LANG = "en_CA"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    The LANG string is the one you need. So, in my case this command solved my problem:

    Code:
    $ sudo locale-gen en_CA
    Great answer, did the trick for me.

    Thanks!

  4. #14
    Join Date
    Sep 2005
    Location
    Winnipeg, Canada
    Beans
    177
    Distro
    Ubuntu

    Re: perl: warning: Setting locale failed.

    I found I needed to add
    Code:
    setenv LANG "en_CA"
    setenv LANGUAGE "en_CA.UTF8"
    The quotation marks are absolutely necessary. I inserted these in my .tcshrc source file and now everything is fine. Not sure if it is dependent on CSH/TCSH.

    Hope this helps
    linux, linux, linux

  5. #15
    Join Date
    Aug 2008
    Beans
    Hidden!

    Re: perl: warning: Setting locale failed.

    Worked for me thanks!

  6. #16
    Join Date
    Jun 2008
    Location
    South Uist, Scotland
    Beans
    20
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: perl: warning: Setting locale failed.

    Thanks ejmadar, solution still working on a Virtual Private Server running 12.04 Server.

    Code:
    root@vps:/# locale-gen en_GB.UTF-8
    Generating locales...
      en_GB.UTF-8... done
    Generation complete.
    Before:

    Code:
    root@vps:/# locale
    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
    LANG=en_GB.utf8
    LANGUAGE=
    LC_CTYPE="en_GB.utf8"
    LC_NUMERIC="en_GB.utf8"
    LC_TIME="en_GB.utf8"
    LC_COLLATE="en_GB.utf8"
    LC_MONETARY="en_GB.utf8"
    LC_MESSAGES="en_GB.utf8"
    LC_PAPER="en_GB.utf8"
    LC_NAME="en_GB.utf8"
    LC_ADDRESS="en_GB.utf8"
    LC_TELEPHONE="en_GB.utf8"
    LC_MEASUREMENT="en_GB.utf8"
    LC_IDENTIFICATION="en_GB.utf8"
    LC_ALL=
    After:
    Code:
    root@vps:/# locale
    LANG=en_GB.utf8
    LANGUAGE=
    LC_CTYPE="en_GB.utf8"
    LC_NUMERIC="en_GB.utf8"
    LC_TIME="en_GB.utf8"
    LC_COLLATE="en_GB.utf8"
    LC_MONETARY="en_GB.utf8"
    LC_MESSAGES="en_GB.utf8"
    LC_PAPER="en_GB.utf8"
    LC_NAME="en_GB.utf8"
    LC_ADDRESS="en_GB.utf8"
    LC_TELEPHONE="en_GB.utf8"
    LC_MEASUREMENT="en_GB.utf8"
    LC_IDENTIFICATION="en_GB.utf8"
    LC_ALL=

  7. #17
    Join Date
    Aug 2008
    Beans
    30

    Re: perl: warning: Setting locale failed.

    Worked great! Thank you!!

  8. #18
    Join Date
    Nov 2007
    Location
    New York, NY
    Beans
    38
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: perl: warning: Setting locale failed.

    Sweet, fixed for me!
    Mobo: ECS-K8M890-M; 2GB DDR2; AMD Athlon64X2 AM2 2.2Ghz;
    OS: Leo, W7, Jaunty; AV: AC97; Sapphire X1650 256MB DDR2
    HD: WD40GB IDE (OSX) & Seagate160GB SATA (Win/Linux)
    WLAN: Linksys WUSB54Gv4 (rt2x00) & Asus USB-N11 (???)

  9. #19
    Join Date
    Apr 2012
    Beans
    1

    Re: perl: warning: Setting locale failed.

    Thank's you. For russuan
    Code:
    # sudo locale-gen ru_RU ru_RU.UTF-8 ru_RU ru_RU.UTF-8

  10. #20
    Join Date
    Jun 2008
    Beans
    3
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: perl: warning: Setting locale failed.

    This was in the right direction, but unfortunately, didn't fix it for me. What did, however, was this:

    http://bookmarks.honewatson.com/2009...ttings-ubuntu/

    EDIT:

    Further investigation shows the fix in my case was even easier than I thought, before:

    Code:
    $ locale
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=en_US.UTF-8
    LANGUAGE=en_US:en
    LC_CTYPE=UTF-8
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    So I set LC_TYPE and LC_ALL manually like so:

    Code:
    $ export LC_TYPE="en_US.UTF-8"
    $ export LC_ALL="en_US.UTF-8"
    The result is a fix:

    Code:
    $ locale
    LANG=en_US.UTF-8
    LANGUAGE=en_US:en
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=en_US.UTF-8
    SECOND EDIT:

    .. Unfortunately, the above 'solution' only worked for that terminal session. As soon as I reconnected, locale errors rained down on me again..

    Delving furhter into this issue, I came across:
    http://stackoverflow.com/questions/2...ning-from-perl

    What permanently fixed it for me is commenting out the following directive in my /etc/ssh/sshd_config (on the remote host):

    Code:
    AcceptEnv LANG LC_*
    Having eliminated that line, and reloading my ssh daemon, this issue was resolved.
    Last edited by CritiKaster; November 16th, 2013 at 08:32 PM.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •