cannot change locale (zh_CN.UTF-8): No such file or directory
CentOS下docker 容器默认字符集为POSIX 如果需要
默认情况下查看字符集如下,可修改POSIX 为 zh_CN.UTF-8
# 查看字符集 [root@125ee23abc /]# locale LANG= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL=
-
解决方案:
注释或删掉 /etc/yum.conf 中的en_US.utf8,如下:
# 修改yum.conf vi /etc/yum.conf # override_install_langs=en_US.utf8 # 重新安装 glibc-common yum -y -q reinstall glibc-common
标签:LC,CentOS,yum,conf,POSIX,docker From: https://www.cnblogs.com/yuejunasia/p/16643606.html