Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 702921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:46:27+00:00 2026-05-14T03:46:27+00:00

When I run perl , I get the warning: perl: warning: Setting locale failed.

  • 0

When I run perl, I get the warning:

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

How do I fix it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:46:27+00:00Added an answer on May 14, 2026 at 3:46 am

    Your OS doesn’t know about en_US.UTF-8.

    You didn’t mention a specific platform, but I can reproduce your problem:

    % uname -a
    OSF1 hunter2 V5.1 2650 alpha
    % perl -e exit
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").

    My guess is you used ssh to connect to this older host from a newer desktop machine. It’s common for /etc/ssh/sshd_config to contain

    AcceptEnv LANG LC_*
    

    which allows clients to propagate the values of those environment variables into new sessions.

    The warning gives you a hint about how to squelch it if you don’t require the full-up locale:

    % env LANG=C perl -e exit
    %

    or with Bash:

    $ LANG=C perl -e exit
    $ 

    For a permanent fix, choose one of

    1. On the older host, set the LANG environment variable in your shell’s initialization file.
    2. Modify your environment on the client side, e.g., rather than ssh hunter2, use the command LANG=C ssh hunter2.
    3. If you have administrator rights, stop ssh from sending the environment variables by commenting out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file. (Thanks to this answer. See Bug 1285 for OpenSSH for more.)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I run... perlbrew switch perl-5.16.0 ...I get... A sub-shell is launched with perl-5.16.0
Trying to get the hang of using OOP in Perl. My problem is that
When you run perl -e "Bla->new" , you get this well-known error: Can't locate
I'm writing a script in Perl that needs to run at the same time
I really do not get how to run a Perl file. I have uploaded
When I set my locale to it_IT.UTF-8 (export LC_ALL=it_IT.UTF-8) and run this script #!/usr/bin/env
I use to run $s =~ s/[^[:print:]]//g; on Perl to get rid of non
maybe this is a stupid question but : i run perl 5.8.8 and i
I have run this Perl code: #!/usr/bin/perl print content-type: text/html \n\n; print Hello World.\n;
In Perl, to run another Perl script from my script, or to run any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.