Fix_LC_ALL_cannot_change_locale

Posted on Mar 28, 2024

I started seeing error bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) in my terminal.

Upon searching I came across below solution which resolved my issue

sudo su - 
apt-get update
apt-get install locales
echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8

Hope it helps.