{"id":22,"date":"2017-01-23T13:57:00","date_gmt":"2017-01-23T13:57:00","guid":{"rendered":""},"modified":"2021-02-22T01:13:15","modified_gmt":"2021-02-22T01:13:15","slug":"fixing-perl-warning-setting-locale","status":"publish","type":"post","link":"https:\/\/www.tech-and-dev.com\/blog\/2017\/01\/fixing-perl-warning-setting-locale.html","title":{"rendered":"Fixing &#8220;perl: warning: Setting locale failed&#8221; On Ubuntu"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2017\/01\/ubuntu-2Blogo.png\"><img decoding=\"async\" title=\"Ubuntu Logo\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2017\/01\/ubuntu-2Blogo.png\" alt=\"Ubuntu Logo\" border=\"0\" \/><\/a><\/div>\n<p>If you&#8217;re ever faced with this warning, which usually happens on a fresh Ubuntu installation:<\/p>\n<p>perl: warning: Setting locale failed.<br \/>\nperl: warning: Please check that your locale settings:<br \/>\nLANGUAGE = &#8220;en_US:en&#8221;,<br \/>\nLC_ALL = (unset),<br \/>\nLC_MESSAGES = &#8220;en_US.UTF-8&#8221;,<br \/>\nLANG = &#8220;en_US.UTF-8&#8221;<br \/>\nare supported and installed on your system.<\/p>\n<p><a name=\"more\"><\/a><br \/>\nperl: warning: Falling back to the standard locale (&#8220;C&#8221;).<br \/>\nlocale: Cannot set LC_CTYPE to default locale: No such file or directory<br \/>\nlocale: Cannot set LC_MESSAGES to default locale: No such file or directory<br \/>\nlocale: Cannot set LC_ALL to default locale: No such file or directory<\/p>\n<p>You can fix it easily by doing the following:<\/p>\n<pre>locale-gen \"en_US.UTF-8\"<\/pre>\n<p>And then run:<\/p>\n<pre>dpkg-reconfigure locales<\/pre>\n<p>Locales are a framework to switch between multiple languages and allow users to use their language, characters and collation orders.<\/p>\n<p><b>Any questions or comments? Please post below!<\/b><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re ever faced with this warning, which usually happens on a fresh Ubuntu installation: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = &#8220;en_US:en&#8221;, LC_ALL = (unset), LC_MESSAGES = &#8220;en_US.UTF-8&#8221;, LANG = &#8220;en_US.UTF-8&#8221; are supported and installed on your system. perl: warning: Falling back to the standard locale [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,31,4],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-linux","category-server","category-ubuntu"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":2,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":371,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/22\/revisions\/371"}],"wp:attachment":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}