Ruan Bekker's Blog

From a Curious mind to Posts on Github

AWS EC2 Linux - Warning: Setlocale: LC_CTYPE: Cannot Change Locale UTF-8

On Amazon Linux EC2 Instances, I noticed the following error when SSH onto them:

1
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

To resolve, add the following to the /etc/environment file:

1
2
3
$ cat /etc/environment
LANG=en_US.utf-8
LC_ALL=en_US.utf-8

Logout and log back in and it should be resolved.

-->

Comments