Fix Locale Settings Error On Ubuntu Server 14.04

time to read 1 min | 127 words

We are just migrating our cloud from Amazon Web Service to SoftLayer, and we feel really happy with performance improvement. But, somehow the new system has error like this.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:",
	LC_ALL = (unset),
	LC_PAPER = "id_ID.UTF-8",
	LC_ADDRESS = "id_ID.UTF-8",
	LC_NUMERIC = "id_ID.UTF-8",
	LC_CTYPE = "en_US.UTF-8",
	LC_TIME = "id_ID.UTF-8",
	LC_NAME = "id_ID.UTF-8",
	LANG = "en_US"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Apparently our OS doesn’t know about en_US.UTF-8, and we can easily fix this just by running this few line of commands

export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen
sudo dpkg-reconfigure locales