不能修改字符集的相关错误的解决办法

现象:

执行某些命令报以下错误消息:

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

https://www.cnblogs.com/coolYuan/p/10552585.html

本篇文章出自“国民时代”,转载请注明转载出处。
原文地址:https://www.cnblogs.com/ChinaGo/p/12361889.html