How to fix a locale setting warning from Perl?

后端 未结 30 1659
清酒与你
清酒与你 2020-11-27 08:36

When I run perl, I get the warning:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset         


        
30条回答
  •  爱一瞬间的悲伤
    2020-11-27 09:24

    In Arch Linux using a UK keyboard / locale I had the following error:

    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.utf8"
    
    • Exporting my locales in /etc/profile didn't fix it.

    • I did however fix this by editing /etc/locale.gen & also enabling
      the en_US.utf8 locale that perl expected to find & running local-gen.

    (I use pac-manager which uses a whole bunch of perl modules from AUR so reinstalling perl in my particular case would be a nuisance)

提交回复
热议问题