Sha*_*aus 12 linux amazon-ec2 amazon-web-services
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"
Run Code Online (Sandbox Code Playgroud)
你怎么解决这个?
Mic*_*joe 39
另一种解决方案是添加这些行 /etc/environment
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
Run Code Online (Sandbox Code Playgroud)
下次登录警告消息时应该已经消失.
打开你的ssh_config文件(在我的例子中,它位于Ubuntu/etc/ssh/ssh_config下:),并注释掉这一行:
SendEnv LANG LC_*
Run Code Online (Sandbox Code Playgroud)
这意味着 :
#SendEnv LANG LC_*
Run Code Online (Sandbox Code Playgroud)