阅读背景:

AWS ec2 en_US.UTF-8问题

来源:互联网 

https://aws.amazon.com/amazon-linux-ami/2012.03-release-notes/

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"

how do you solve this?

你怎么解决这个?

2 个解决方案

#1


26  

Another solution is to add these lines to /etc/environment

另一种解决方案是将这些行添加到/ etc / environment

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

The next time you log in the warning message should have disappeared.

下次登录警告消息时应该已经消失。

#2


2  

Open your ssh_config file (in my case under Ubuntu it's located here : /etc/ssh/ssh_config), and comment this line:

打开你的ssh_config文件(在我的情况下,在Ubuntu下它位于:/ etc / ssh / ssh_config),并注释这一行:

SendEnv LANG LC_*

This means :

意即 :

#SendEnv LANG LC_*

分享到: