/bin/sh: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8) centos7

Posted fan-gx

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了/bin/sh: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8) centos7相关的知识,希望对你有一定的参考价值。

今天登陆centos 7 遇到一个 警告

/bin/sh: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)

bash : warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)

只要执行 :

yum -y install kde-l10n-Chinese telnet && 
yum -y reinstall glibc-common

#基本就能搞定 ,还有修改一下 

/etc/locale.conf  

LC_ALL="zh_CN.UTF-8"

在docker 容器里,还需要执行下

localedef -c -f UTF-8 -i zh_CN zh_CN.utf8

以上是关于/bin/sh: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8) centos7的主要内容,如果未能解决你的问题,请参考以下文章