crx349 发表于 2020-1-4 02:24:53

LC_CTYPE: cannot change locale 故障解决(centos 7)



故障:
ssh登录时报错-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (zh_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_MESSAGES: cannot change locale (zh_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_NUMERIC: cannot change locale (zh_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_TIME: cannot change locale (zh_US.UTF-8): No such file or directory

解决:
vi /etc/locale.conf
加入:
LC_CTYPE="zh_CN.utf8"
LANG="zh_CN.utf8"

保存。
重新ssh连接,问题解决
页: [1]
查看完整版本: LC_CTYPE: cannot change locale 故障解决(centos 7)