报错提示
Failed to set locale, defaulting to C.UTF-8
解决过程
- 查看当前系统支持的语言
[root@kubernetes-template-os ~]# locale -a
C
C.utf8
en_AG
en_AU
en_AU.utf8
en_BW
en_BW.utf8
en_CA
en_CA.utf8
en_DK
en_DK.utf8
en_GB
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.utf8
en_IE
en_IE@euro
en_IE.utf8
en_IL
en_IN
en_NG
en_NZ
en_NZ.utf8
en_PH
en_PH.utf8
en_SC.utf8
en_SG
en_SG.utf8
en_US
en_US@ampm
en_US.iso885915
en_US.utf8
en_US.utf8@ampm
en_ZA
en_ZA.utf8
en_ZM
en_ZW
en_ZW.utf8
POSIX
- 修改/etc/environment
[root@kubernetes-template-os ~]# vim /etc/environment
## 修改内容如下
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
- 修改/etc/locale.conf
[root@kubernetes-template-os ~]# vim /etc/locale.conf
## 修改内容如下
LANG="en_US.UTF-8"
LC_ALL=en_US.UTF-8