Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Created September 13, 2025 01:31
Show Gist options
  • Save zoonderkins/3262d4115a4609e2dadd2444a1c1198b to your computer and use it in GitHub Desktop.
Save zoonderkins/3262d4115a4609e2dadd2444a1c1198b to your computer and use it in GitHub Desktop.
debian-locale-bash-warning

Error

-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
-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_ALL: cannot change locale (en_US.UTF-8): No such file or directory
-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_ALL: cannot change locale (en_US.UTF-8): No such file or directory

Solution

sudo apt update
sudo apt install -y locales

sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8

sudo dpkg-reconfigure locales
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment