{"id":7458,"date":"2018-03-08T16:57:15","date_gmt":"2018-03-08T16:57:15","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=7458"},"modified":"2018-03-08T17:22:06","modified_gmt":"2018-03-08T17:22:06","slug":"raspberry-pi-3-set-locale","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=7458","title":{"rendered":"Raspberry Pi 3, Set Locale"},"content":{"rendered":"<p><a href=\"https:\/\/www.raspberrypi.org\/documentation\/configuration\/localisation.md\">Localisation<\/a><\/p>\n<p><a href=\"https:\/\/unix.stackexchange.com\/questions\/269159\/problem-of-cant-set-locale-make-sure-lc-and-lang-are-correct\">Problem of Can&#8217;t set locale; make sure $LC_* and $LANG are correct!<\/a><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo apt-get install tree\r\nReading package lists... Done\r\nBuilding dependency tree       \r\nReading state information... Done\r\nThe following NEW packages will be installed:\r\n  tree\r\n0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.\r\nNeed to get 41.4 kB of archives.\r\nAfter this operation, 93.2 kB of additional disk space will be used.\r\nGet:1 http:\/\/mirrordirector.raspbian.org\/raspbian stretch\/main armhf tree armhf 1.7.0-5 &#x5B;41.4 kB]\r\nFetched 41.4 kB in 0s (208 kB\/s)\r\napt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!\r\nperl: warning: Setting locale failed.\r\nperl: warning: Please check that your locale settings:\r\n\tLANGUAGE = (unset),\r\n\tLC_ALL = (unset),\r\n\tLC_TIME = &quot;de_CH.UTF-8&quot;,\r\n\tLC_MONETARY = &quot;de_CH.UTF-8&quot;,\r\n\tLC_ADDRESS = &quot;de_CH.UTF-8&quot;,\r\n\tLC_TELEPHONE = &quot;de_CH.UTF-8&quot;,\r\n\tLC_NAME = &quot;de_CH.UTF-8&quot;,\r\n\tLC_MEASUREMENT = &quot;de_CH.UTF-8&quot;,\r\n\tLC_IDENTIFICATION = &quot;de_CH.UTF-8&quot;,\r\n\tLC_NUMERIC = &quot;de_CH.UTF-8&quot;,\r\n\tLC_PAPER = &quot;de_CH.UTF-8&quot;,\r\n\tLANG = &quot;en_GB.UTF-8&quot;\r\n    are supported and installed on your system.\r\nperl: warning: Falling back to a fallback locale (&quot;en_GB.UTF-8&quot;).\r\nlocale: Cannot set LC_ALL to default locale: No such file or directory\r\nSelecting previously unselected package tree.\r\n(Reading database ... 34443 files and directories currently installed.)\r\nPreparing to unpack ...\/tree_1.7.0-5_armhf.deb ...\r\nUnpacking tree (1.7.0-5) ...\r\nSetting up tree (1.7.0-5) ...\r\nProcessing triggers for man-db (2.7.6.1-2) ...\r\n\r\n\r\n$ export\r\ndeclare -x LANG=&quot;en_GB.UTF-8&quot;\r\ndeclare -x LC_ADDRESS=&quot;de_CH.UTF-8&quot;\r\ndeclare -x LC_IDENTIFICATION=&quot;de_CH.UTF-8&quot;\r\ndeclare -x LC_MEASUREMENT=&quot;de_CH.UTF-8&quot;\r\ndeclare -x LC_MONETARY=&quot;de_CH.UTF-8&quot;\r\ndeclare -x LC_NAME=&quot;de_CH.UTF-8&quot;\r\ndeclare -x LC_NUMERIC=&quot;de_CH.UTF-8&quot;\r\ndeclare -x LC_PAPER=&quot;de_CH.UTF-8&quot;\r\ndeclare -x LC_TELEPHONE=&quot;de_CH.UTF-8&quot;\r\ndeclare -x LC_TIME=&quot;de_CH.UTF-8&quot;\r\n\r\n$ locale\r\nlocale: Cannot set LC_ALL to default locale: No such file or directory\r\nLANG=en_GB.UTF-8\r\nLANGUAGE=\r\nLC_CTYPE=&quot;en_GB.UTF-8&quot;\r\nLC_NUMERIC=de_CH.UTF-8\r\nLC_TIME=de_CH.UTF-8\r\nLC_COLLATE=&quot;en_GB.UTF-8&quot;\r\nLC_MONETARY=de_CH.UTF-8\r\nLC_MESSAGES=&quot;en_GB.UTF-8&quot;\r\nLC_PAPER=de_CH.UTF-8\r\nLC_NAME=de_CH.UTF-8\r\nLC_ADDRESS=de_CH.UTF-8\r\nLC_TELEPHONE=de_CH.UTF-8\r\nLC_MEASUREMENT=de_CH.UTF-8\r\nLC_IDENTIFICATION=de_CH.UTF-8\r\nLC_ALL=\r\n\r\n$ locale -a\r\nC\r\nC.UTF-8\r\nen_GB.utf8\r\nes_US.utf8\r\nPOSIX\r\n\r\n$ perl -e exit\r\nperl: warning: Setting locale failed.\r\nperl: warning: Please check that your locale settings:\r\n\tLANGUAGE = (unset),\r\n\tLC_ALL = (unset),\r\n\tLC_MEASUREMENT = &quot;de_CH.UTF-8&quot;,\r\n\tLC_PAPER = &quot;de_CH.UTF-8&quot;,\r\n\tLC_MONETARY = &quot;de_CH.UTF-8&quot;,\r\n\tLC_NAME = &quot;de_CH.UTF-8&quot;,\r\n\tLC_ADDRESS = &quot;de_CH.UTF-8&quot;,\r\n\tLC_NUMERIC = &quot;de_CH.UTF-8&quot;,\r\n\tLC_TELEPHONE = &quot;de_CH.UTF-8&quot;,\r\n\tLC_IDENTIFICATION = &quot;de_CH.UTF-8&quot;,\r\n\tLC_TIME = &quot;de_CH.UTF-8&quot;,\r\n\tLANG = &quot;en_GB.UTF-8&quot;\r\n    are supported and installed on your system.\r\nperl: warning: Falling back to a fallback locale (&quot;en_GB.UTF-8&quot;).\r\n\r\n\r\n<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo sh -c &quot;cat &lt;&lt; EOF  &gt; \/etc\/default\/locale\r\n# \/etc\/default\/locale\r\nLANG=ar_EG.UTF-8\r\nLANGUAGE=ar_EG.UTF-8\r\nLC_ALL=ar_EG.UTF-8\r\nEOF&quot;;\r\n\r\nIn \/etc\/ssh\/ssh_config:\r\nSendEnv LANG LC_*\r\n\r\nIn \/etc\/ssh\/sshd_config:\r\nAcceptEnv LANG LC_*\r\n<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo dpkg-reconfigure locales\r\nor\r\n$ sudo vim \/etc\/locale.gen\r\nuncomment:\r\nen_US.UTF-8 UTF-8\r\n$ sudo locale-gen\r\n$ sudo nano \/etc\/profile\r\nadd:\r\nexport LANG=en_US.UTF-8\r\nexport LC_ALL=en_US.UTF-8\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Localisation Problem of Can&#8217;t set locale; make sure $LC_* and $LANG are correct! $ sudo apt-get install tree Reading package lists&#8230; Done Building dependency tree Reading state information&#8230; Done The following NEW packages will be installed: tree 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 41.4 kB of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7458","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/7458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7458"}],"version-history":[{"count":10,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/7458\/revisions"}],"predecessor-version":[{"id":7470,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/7458\/revisions\/7470"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}