Locale Warning On Ubuntu

Locale Warning On Ubuntu

When I was trying to run update-rc.d command to start some service on boot time, I kept getting this warning message:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
It is quite annoying to see the message all the time. To fix it I did the following:
sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales
After this everything is now back to normal.

Leave a Reply

Your email address will not be published.

My new Snowflake Blog is now live. I will not be updating this blog anymore but will continue with new contents in the Snowflake world!