{"id":31,"date":"2014-07-09T23:52:00","date_gmt":"2014-07-09T23:52:00","guid":{"rendered":"http:\/\/390@jodohost.com\/\/blog\/"},"modified":"2023-01-05T16:16:02","modified_gmt":"2023-01-05T16:16:02","slug":"failed-to-set-locale-defaulting-to-c","status":"publish","type":"post","link":"http:\/\/www.jodohost.com\/blog\/index.php\/2014\/07\/09\/failed-to-set-locale-defaulting-to-c\/","title":{"rendered":"Failed to set locale, defaulting to C"},"content":{"rendered":"<p>This error &#8220;Failed to set locale, defaulting to C&#8221; is generally occur on ubuntu OS when there is no locale setup permanently in the environment which you work. It most commonly comes when you do login to your ubuntu machine via ssh or while start\/stop a service on it. To fix this problem follow are some ways which suited on the distribution basis using below steps :- <\/p>\n<p>1) <\/p>\n<p>sudo locale-gen en_US en_US.UTF-8<br \/>dpkg-reconfigure locales<\/p>\n<p>dpkg-reconfigure reconfigures packages after they have already been installed. <\/p>\n<p>2) However, in some ubuntu distribution it doesn&#8217;t resolve the issue with above and there need to do the following way :- <\/p>\n<p>export LANG=en_US<\/p>\n<p>or <\/p>\n<p>Put the file below lines in \/etc\/environment:<\/p>\n<p>LC_ALL=en_US.UTF-8<br \/>LANG=en_US.UTF-8<\/p>\n<p>or <\/p>\n<p>Add the below line in .bashrc file :- <\/p>\n<p>export LC_ALL=&#8221;en_US.UTF-8&#8243;<\/p>\n<p>Note: Make sure that on your machine the language pack has been installed otherwise the above entries won&#8217;t work. So to install the language pack just run the below command :- <\/p>\n<p>apt-get install language-pack-en-base \u00a0<\/p>\n<p>These above are some ways as per the distribution to solve this\u00a0 locale setting error.<\/p>\n<p> ]]><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This error &#8220;Failed to set locale, defaulting to C&#8221; is generally occur on ubuntu OS when there is no locale setup permanently in the environment which you work. It most commonly comes when you do login to your ubuntu machine via ssh or while start\/stop a service on it. To fix this problem follow are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/31"}],"collection":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":1,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":325,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/31\/revisions\/325"}],"wp:attachment":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}