CentOS8 -bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) 解决方法

CentOS8 -bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) 解决方法

dnf install -y langpacks-zh_CN langpacks-en langpacks-en_GB

cat >/etc/profile.d/locale.sh<<-EOF
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_COLLATE=C
export LC_CTYPE=en_US.UTF-8
EOF

source /etc/profile.d/locale.sh

退出终端再重新登录就好了

[root@localhost ~]# locale
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
[root@localhost ~]# 
lookback
  • 本文由 发表于 2020年2月7日22:38:09
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: