现象:
执行某些命令报以下错误消息:
1) locale: Cannot set LC_CTYPE to default locale: No such file or directory
2)/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
3)bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
解决方案:
1)缺少字符集安装文件:/etc/sysconfig/i18n
2)在这个文件里配置相应需要的字符集:
LC_ALL=C export LC_ALL
3)source /etc/sysconfig/i18n