https://aws.amazon.com/amazon-linux-ami/2012.03-release-notes/
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)
[ec2-user@ip-10-136-14-68 ~]$ vi ~/.bash_profile
[ec2-user@ip-10-136-14-68 ~]$
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export LC_CTYPE="en_US.UTF-8"
你是如何解决这个问题的?
答案 0 :(得分:38)
另一种解决方案是将这些行添加到/etc/environment
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
下次登录警告消息时应该已经消失。
答案 1 :(得分:3)
打开您的ssh_config
文件(在我的情况下 Ubuntu 位于此处/etc/ssh/ssh_config
),并对此行进行评论:
SendEnv LANG LC_*
这意味着:
#SendEnv LANG LC_*