Be Genius

Fork Me
Mugshot

Hi, I'm Bodaniel Jeanes.

I'm a Ruby developer from Brisbane, Australia

I am a freelancer who hacks on awesome code. Follow me, recommend me, and link with me.

Fix locale errors on linux

Have you ever gotten error messages such as the following when running commands such as apt-get?

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "en_US.UTF-8",
	LANG = (unset)
    are supported and installed on your system.

I’ve had this problem quite a lot on my VPS boxes on Linode and SliceHost. The solution is simple, simply run the following:

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