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

[实战运维小技巧]-解决perl命令执行或编译问题

发布时间:2020-12-16 00:38:18 所属栏目:大数据 来源:网络整理
导读:解决perl命令执行或编译问题: 执行如下命令时 报错: [root@oldboyetc]# perl -pi -e 's|^passwd:???? files|passwd:???? files ldap|g' /etc/nsswitch.conf perl: warning: Setting locale failed. perl: warning: Please check that your locale settings:

解决perl命令执行或编译问题:
执行如下命令时 报错:
[root@oldboyetc]# perl -pi -e 's|^passwd:???? files|passwd:???? files ldap|g' /etc/nsswitch.conf
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
??????? LANGUAGE = (unset),
??????? LC_ALL = (unset),
??????? LANG = "zh_cn.gb18030"
??? are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

解答: 1.1.2解决perl命令执行或编译问题: [root@oldboy ~]# echo 'export LC_ALL=C'>> /etc/profile #←设置环境变量,解决后面perl程序插件的编译问题。符号“>>”表示向文件追加内容。 [root@oldboy ~]# tail -1 /etc/profile? #←查看是否正确追加了export LC_ALL=C环境配置。 export LC_ALL=C [root@oldboy ~]# source /etc/profile #←使增加的环境变量配置生效。

(编辑:李大同)

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

    推荐文章
      热点阅读