Fix Locale Errors on Ubuntu

Author Avatar
Nathaniel Sep 02, 2016

Recently I acquired quite a few droplets (VPS) from DigitalOcean.

I don’t know why but those newly created droplets all got some locale errors.

After doing some research, I finally came to a perfect solution for all these different but related problems:

First, add the following lines to ~/.bashrc:

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"

Then execute:

$ sudo dpkg-reconfigure locales

That’s it. Problem solved.