-
-
Save jampajeen/841d4eed4da3e6c758bf to your computer and use it in GitHub Desktop.
vi /etc/environment | |
add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |
EinsDreiDreiSiebenX
commented
Mar 26, 2023
+1 for mosamadi solution. It resolved it for me on Amazon Linux 2.
Thank you @mosamadi !
[joshgies@ec2-54-226-27-205 payments-np101 ~]$ sudo su -
Last login: Mon May 1 18:57:54 UTC 2023 on pts/0
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory
[root@ec2-54-226-27-205 payments-np101 ~]$ exit
logout
[joshgies@ec2-54-226-27-205 payments-np101 ~]$ sudo -s
[root@ec2-54-226-27-205 payments-np101 joshgies]$
[root@ec2-54-226-27-205 payments-np101 joshgies]$ man localedef
man: can't set the locale; make sure $LC_* and $LANG are correct
[root@ec2-54-226-27-205 payments-np101 joshgies]$ sudo localedef -i en_US -f UTF-8 en_US.UTF-8
[root@ec2-54-226-27-205 payments-np101 joshgies]$ exit
exit
[joshgies@ec2-54-226-27-205 payments-np101 ~]$ sudo su -
Last login: Mon May 1 18:58:02 UTC 2023 on pts/0
adding that to your .profile (.zprofile, .. or somilar) is enough.