Ubuntu setlocale warning – solved

On a newly setup Ubuntu 10.04 LTS machines, you may encounter the following error, when running commands or trying to auto complete or whatever;

warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

Here’s the fix – open up the nano with the default setlocate

sudo nano /etc/default/locale

Update the contents of the file such that it reads as the one below – you can select your own language settings – like en_IN or en_GB


To temporarily get started without a server reboot, use the following command

export LC_ALL="en_US.UTF-8"

We should be good.

Leave a Reply

Your email address will not be published. Required fields are marked *