-
-
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 |
Don't forget to install glibc-langpack-en
if it's missing.
run command : sudo nano /etc/environment
add the below two lines
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
save- ctrl+o
confirm save
exit nano with- ctrl+x
run command : source /etc/environment
You should be good to go. But i discovered that it needs to reboot on arch given my system specs below for your reference.
run command : sudo nano /etc/environment add the below two lines LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" save- ctrl+o confirm save exit nano with- ctrl+x run command : source /etc/environment
You should be good to go. But i discovered that it needs to reboot on arch given my system specs below for your reference.
It will not work, if you do not have glibc-langpack
installed for the required language. English in our case glibc-langpack-en
Thanks
+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.
+1