15

I tried for example this to solve my problem and this too.

My problem is that when I try to connect to my Raspberry pi2, I got the following messages:

Linux raspberrypi 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Mar 21 13:25:48 2015 from 192.168.10.1
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

Needless to say, when I try to do an "apt-get upgrade" or try to install a new application in my raspberry, I got errors relating to language. That's why I started looking for the solution...

Some additional informations:

When I typed "locale" on my raspberry I got the following messages:

pi@raspberrypi ~ $ locale
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
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

If I write the same command on my laptop (I want to connect to raspberry from this laptop using ssh):

mirind4@mirind4-pc:~$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=
Anthon
  • 78,313
  • 42
  • 165
  • 222
mirind4
  • 253
  • 1
  • 2
  • 6
  • 1
    Try `dpkg-reconfigure locales` and ensure that `en_US.UTF-8` is selected. – jordanm Mar 21 '15 at 16:15
  • does result of ` locale -a` include any de_DE.* ? if no, you need to include german local on the raspberry (I had same problem but forgot how I solve it) – Archemar Mar 21 '15 at 16:20

1 Answers1

20

ssh will forward "some" environnement var from mirind4-pc to raspberry, among them "locale" variable (which are use to print friendly date and number).

According to misc link on Raspian and Ask Unbuntu you may need to generate local locale. From what I guess

sudo locale-gen de_DE.UTF-8
sudo dpkg-reconfigure locales

you can check immediatly after using

foo:~$ LC_TIME=de_DE.UTF-8 date +%A%B
SamstagMärz

I don't have my raspian, but this worked on my ubuntu

Archemar
  • 31,183
  • 18
  • 69
  • 104
  • 3
    Debian and Ubuntu do this differently. `locale-gen en_US.utf8` is the Ubuntu way; on Debian this doesn't change the system configuration, only something that's harmless. `dpkg-reconfigure locales` does nothing useful on Ubuntu and provides an interface to select locales to generate on Debian. – Gilles 'SO- stop being evil' Mar 21 '15 at 18:52