How to fix setlocale error in Raspbian
You’ll get the following error in Raspbian
when locale is not properly set.
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
You can easily fix this via Raspberry Pi Software Configuration Tool
(raspi-config
) as in the following example;
-
Run
raspi-config
from the command line.sudo raspi-config
-
The selected locales will be generated and you should no longer get the error.
Generating locales (this might take a while)... en_US.UTF-8... done Generation complete.