{"id":189,"date":"2013-09-11T22:43:13","date_gmt":"2013-09-11T21:43:13","guid":{"rendered":"http:\/\/papimigas.wordpress.com\/?p=189"},"modified":"2013-09-11T22:43:13","modified_gmt":"2013-09-11T21:43:13","slug":"cannot-set-lc_all-to-default-locale-no-such-file-or-directory","status":"publish","type":"post","link":"https:\/\/papimigas.com\/index.php\/2013\/09\/11\/cannot-set-lc_all-to-default-locale-no-such-file-or-directory\/","title":{"rendered":"Cannot set LC_ALL to default locale: No such file or directory"},"content":{"rendered":"<p>Quando instalo um servidor linux Debian ou Ubuntu em que a linguagem por defeito \u00e9 &#8220;EN&#8221; (ingl\u00eas) e depois instalo a nossa linguagem &#8220;PT&#8221; aparece-me na consola o seguinte erro quando instalo qualquer coisa ou executo algum programa:<\/p>\n<address><strong>perl: warning: Setting locale failed.<\/strong><br \/>\n<strong>perl: warning: Please check that your locale settings:<\/strong><br \/>\n<strong> LANGUAGE = (unset),<\/strong><br \/>\n<strong> LC_ALL = &#8220;&#8221;,<\/strong><br \/>\n<strong> LC_TIME = &#8220;pt_PT.UTF-8&#8221;,<\/strong><br \/>\n<strong> LC_MONETARY = &#8220;pt_PT.UTF-8&#8221;,<\/strong><br \/>\n<strong> LC_ADDRESS = &#8220;pt_PT.UTF-8&#8221;,<\/strong><br \/>\n<strong> LC_TELEPHONE = &#8220;pt_PT.UTF-8&#8221;,<\/strong><br \/>\n<strong> LC_NAME = &#8220;pt_PT.UTF-8&#8221;,<\/strong><br \/>\n<strong> LC_MEASUREMENT = &#8220;pt_PT.UTF-8&#8221;,<\/strong><br \/>\n<strong> LC_IDENTIFICATION = &#8220;pt_PT.UTF-8&#8221;,<\/strong><br \/>\n<strong> LC_NUMERIC = &#8220;pt_PT.UTF-8&#8221;,<\/strong><br \/>\n<strong> LC_PAPER = &#8220;pt_PT.UTF-8&#8221;,<\/strong><br \/>\n<strong> LANG = &#8220;pt_PT.UTF-8&#8221;<\/strong><br \/>\n<strong> are supported and installed on your system.<\/strong><br \/>\n<strong>perl: warning: Falling back to the standard locale (&#8220;C&#8221;).<\/strong><br \/>\n<strong>locale: Cannot set LC_ALL to default locale: No such file or directory<\/strong><\/address>\n<p>Apesar de n\u00e3o provocar falhas \u00e9 uma coisa chata! Como resolver? Muito f\u00e1cil! Primeiro vemos quantas linhas temos &#8220;unset&#8221; ou &#8220;&#8221;. No meu caso s\u00e3o as 2 primeiras:<\/p>\n<address><strong>LANGUAGE = (unset),<\/strong><br \/>\n<strong>LC_ALL = &#8220;&#8221;,<\/strong><\/address>\n<p>Basta executar as 3 linhas seguintes na consola:<\/p>\n<p><strong>sudo export\u00a0LC_ALL=&#8221;pt_PT.UTF-8&#8243;\u00a0<\/strong><\/p>\n<p><strong> sudo export\u00a0LANGUAGE=&#8221;pt_PT.UTF-8&#8243;\u00a0<\/strong><\/p>\n<p><strong>sudo locale-gen pt_PT<\/strong><\/p>\n<p>E pronto, problema resolvido!<strong><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quando instalo um servidor linux Debian ou Ubuntu em que a linguagem por defeito \u00e9 &#8220;EN&#8221; (ingl\u00eas) e depois instalo a nossa linguagem &#8220;PT&#8221; aparece-me na consola o seguinte erro quando instalo qualquer coisa ou executo algum programa: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL &hellip; <a href=\"https:\/\/papimigas.com\/index.php\/2013\/09\/11\/cannot-set-lc_all-to-default-locale-no-such-file-or-directory\/\" class=\"more-link\">Continuar a ler<span class=\"screen-reader-text\"> &#8220;Cannot set LC_ALL to default locale: No such file or directory&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[28,107,108],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category-linux","tag-cannot-set-lc_all-to-default-locale","tag-perl-warning-falling-back-to-the-standard-locale-c","tag-perl-warning-setting-locale-failed"],"_links":{"self":[{"href":"https:\/\/papimigas.com\/index.php\/wp-json\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/papimigas.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/papimigas.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/papimigas.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/papimigas.com\/index.php\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":0,"href":"https:\/\/papimigas.com\/index.php\/wp-json\/wp\/v2\/posts\/189\/revisions"}],"wp:attachment":[{"href":"https:\/\/papimigas.com\/index.php\/wp-json\/wp\/v2\/media?parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/papimigas.com\/index.php\/wp-json\/wp\/v2\/categories?post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/papimigas.com\/index.php\/wp-json\/wp\/v2\/tags?post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}