locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
提示:Cannot change locale UTF-8,并且后面的提示是乱码。
应该是之前将中文设置中文的问题。
#echo $LC_CTYPE
#UTF-8
用locale -a命令看下支持如下中文编码:
#locale -a | grep zh
zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8
将/etc/sysconfig/i18n文件改为如下配置:(之前设置了一个不存在的中文编码)
LANG="zh_CN.UTF-8"
LC_ALL="zh_CN.UTF-8"
---------------------
作者:wave_1102
来源:CSDN
原文:https://blog.csdn.net/wave_1102/article/details/45116783
版权声明:本文为博主原创文章,转载请附上博文链接!
___________________________________________________________________________________________________________
在登录的时候出现下面问题:
-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (zh_CN.UTF-8): No such file or directory
-bash: warning: setlocale: LC_MESSAGES: cannot change locale (zh_CN.UTF-8): No such file or directory
-bash: warning: setlocale: LC_NUMERIC: cannot change locale (zh_CN.UTF-8): No such file or directory
-bash: warning: setlocale: LC_TIME: cannot change locale (zh_CN.UTF-8): No such file or directory
解决办法:
vi /etc/profile
进入后进行编辑
加入:
export LC_ALL=C
保存退出:
ctrl+c , shift z z
问题解决
---------------------
作者:shlxll
来源:CSDN
原文:https://blog.csdn.net/weixin_37577564/article/details/80693204
版权声明:本文为博主原创文章,转载请附上博文链接!