加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

perl: warning: Setting locale failed.

发布时间:2020-12-16 00:03:39 所属栏目:大数据 来源:网络整理
导读:转载自:http://blog.chinaunix.net/uid-27570589-id-3691390.html 运行某些perl 编写的脚本时 会报出一下的错误: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: ??????? LANGUAGE = (unset), ??????? LC
转载自:http://blog.chinaunix.net/uid-27570589-id-3691390.html
运行某些perl 编写的脚本时 会报出一下的错误:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
??????? LANGUAGE = (unset),
??????? LC_ALL = (unset),
??????? LANG = "zh_CN.ZHS16GBK"
??? are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't locate warning.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./perl_tac line 2.
BEGIN failed--compilation aborted at ./perl_tac line 2.

以上问题分为两部分 (1)perl: warning: Falling back to the standard locale ("C"). 到这一句?为分界线,这个问题的解决方式
????????????????????????????????? 因为我是在普通用户下运行的? 直接改当前用户的环境变量就可以?vi.bash_profile??在最后输入 export LC_ALL=C
或者
?? vi /root/.bashrc
再最底部加上
? ?export LC_ALL=C
或者直接运行
? ?echo "export LC_ALL=C" >> /root/.bashrc
然后执行一下:
? ?source /root/.bashrc?
????????????????????????????? (2)? can't locate warning.pm in @INC? 不能定位warning 模块?? ??????????????????????????????? 如何查看perl?安装过的模块 ?find `perl -e 'print "@INC"'` -name "*.pm" ?????????????????????????????? 后来发现 是use warnings?这忘记写s 了??

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读