User avatar
janoble
Posts: 12
Joined: Fri Sep 28, 2012 11:53 pm

raspi-config doesn't set locale

Fri Oct 05, 2012 4:12 pm

When I try to set the locale using raspi-config I it doesn't seem to work and messes up my keyboard mapping. Here's what a session looks like:


pi@raspberrypi ~ $ more locale.txt
pi@raspberrypi ~ $ sudo raspi-config
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or director
y
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or direc
tory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or director
y
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or direc
tory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory

Current default time zone: 'America/Denver'
Local time is now: Fri Oct 5 09:25:57 MDT 2012.
Universal Time is now: Fri Oct 5 15:25:57 UTC 2012.
A computer may beat me at chess, but I always win at kick boxing.

User avatar
janoble
Posts: 12
Joined: Fri Sep 28, 2012 11:53 pm

Re: raspi-config doesn't set locale

Fri Oct 05, 2012 7:47 pm

I've connected using putty from a Win7 computer and the keymapping looks fine. Had no problem connecting using SSH.
A computer may beat me at chess, but I always win at kick boxing.

User avatar
JimDod
Posts: 22
Joined: Wed Apr 04, 2012 10:24 pm
Location: Southern California
Contact: Website

Re: raspi-config doesn't set locale

Fri Oct 12, 2012 12:58 am

I see the same problem. I am using arch linix

User avatar
JimDod
Posts: 22
Joined: Wed Apr 04, 2012 10:24 pm
Location: Southern California
Contact: Website

Re: raspi-config doesn't set locale

Fri Oct 12, 2012 11:27 pm

My fix was simple, after if figured it out


I put

export LC_ALL=C

in my .bashrc

User avatar
janoble
Posts: 12
Joined: Fri Sep 28, 2012 11:53 pm

Re: raspi-config doesn't set locale

Sat Oct 13, 2012 2:19 am

Why thanks. That does sound simple. I'll try it tomorrow morning and let you know if it works to fix my keyboard mapping problem. How did you figure this one out?

Thanks
Joe
A computer may beat me at chess, but I always win at kick boxing.

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: raspi-config doesn't set locale

Sat Oct 13, 2012 5:01 am

The locale is normally set in the system for system wide use in

/etc/default/locale

Code: Select all

#  File generated by update-locale
LANG=en_US.UTF-8
You can also manually set the keyboard via the file

/etc/default/keyboard

Code: Select all

# Check /usr/share/doc/keyboard-configuration/README.Debian for
# documentation on what to do after having modified this file.

# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""

# If you don't want to use the XKB layout on the console, you can
# specify an alternative keymap.  Make sure it will be accessible
# before /usr is mounted.
# KMAP=/etc/console-setup/defkeymap.kmap.gz
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

User avatar
janoble
Posts: 12
Joined: Fri Sep 28, 2012 11:53 pm

Re: raspi-config doesn't set locale

Sat Oct 13, 2012 1:25 pm

I tried the "export LC_ALL=C" in my .bashrc and it seems to work. The keyboard mapping seems to make sense now. Here's what I get from the locale command:
  • LANG=en_US.UTF-8
    LANGUAGE=
    LC_CTYPE="C"
    LC_NUMERIC="C"
    LC_TIME="C"
    LC_COLLATE="C"
    LC_MONETARY="C"
    LC_MESSAGES="C"
    LC_PAPER="C"
    LC_NAME="C"
    LC_ADDRESS="C"
    LC_TELEPHONE="C"
    LC_MEASUREMENT="C"
    LC_IDENTIFICATION="C"
    LC_ALL=C
I also looked in the two etc/default files and they look reasonable.

/etc/default/locale:
  • # File generated by update-locale
    LANG=en_US.UTF-8
/etc/default/keyboard
  • # KEYBOARD CONFIGURATION FILE

    # Consult the keyboard(5) manual page.

    XKBMODEL="logitech_base"
    XKBLAYOUT="us"
    XKBVARIANT=""
    XKBOPTIONS="lv3:ralt_alt"

    BACKSPACE="guess"
I'm a little surprised that LANGUAGE doesn't appear to be set, but heh, it seems to be working for now.

Everything seems to be working, so I'm now a happy camper! :D

Thanks for the post responses and the help they provided.

Joe
A computer may beat me at chess, but I always win at kick boxing.

sander2
Posts: 60
Joined: Wed Jul 04, 2012 2:22 pm

Re: raspi-config doesn't set locale

Sun May 26, 2013 6:03 am

JimDod wrote:My fix was simple, after if figured it out


I put

export LC_ALL=C

in my .bashrc
That worked for me. Thank you!

daved
Posts: 1
Joined: Sat Mar 01, 2014 4:09 pm

Re: raspi-config doesn't set locale

Sat Mar 01, 2014 4:16 pm

I just found that if you don't set your locale properly in raspi-config (or original setup), you get those warnings. After you set your locale, it then asks for your Default Locale and gives you two options: None (selected by default), or the option you selected above. You need to select your option, then you won't get those warnings.

Cheers

Jaroden [RasuOsu]
Posts: 3
Joined: Tue Aug 27, 2013 9:21 pm

Re: raspi-config doesn't set locale

Wed Apr 15, 2015 3:13 am

daved wrote:I just found that if you don't set your locale properly in raspi-config (or original setup), you get those warnings. After you set your locale, it then asks for your Default Locale and gives you two options: None (selected by default), or the option you selected above. You need to select your option, then you won't get those warnings.

Cheers
ok how do you select the said option? because even if i select the none it still says the same thing on the bottom of the screen.
when you highlight either of the options then hit ok. It gives the same result.
Generating locals (this might take a while)...
en_US.UTF-8
Generation complete

How do i select the right option?

Nerol
Posts: 5
Joined: Thu Aug 13, 2015 10:04 am

Re: raspi-config doesn't set locale

Thu Aug 13, 2015 10:14 am

I solved that with this:

Code: Select all

sudo dpkg-reconfigure locales
And following the process

klricks
Posts: 4812
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: raspi-config doesn't set locale

Thu Aug 13, 2015 1:16 pm

Jaroden [RasuOsu] wrote:
daved wrote:I just found that if you don't set your locale properly in raspi-config (or original setup), you get those warnings. After you set your locale, it then asks for your Default Locale and gives you two options: None (selected by default), or the option you selected above. You need to select your option, then you won't get those warnings.

Cheers
ok how do you select the said option? because even if i select the none it still says the same thing on the bottom of the screen.
when you highlight either of the options then hit ok. It gives the same result.
Generating locals (this might take a while)...
en_US.UTF-8
Generation complete

How do i select the right option?
In the long list of locales use space bar to select/un-select. Be sure to browse the entire list and un-select any unwanted locales. In the next menu you will see all of the locales that you selected in the first step. (Most should have only selected one locale). Use the arrow keys to move down the llst and highlight the one locale that you want then arrow to [OK] (Do not select NONE else you will get none).
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://blackeagle12.net/Comp/RPi/Rpi.html Click contact icon then world icon --->

barraba
Posts: 33
Joined: Wed Sep 28, 2016 12:17 pm

Re: raspi-config doesn't set locale

Fri Oct 21, 2016 9:35 am

interesting, my ssh is in propper language and console is abra-cadabra.
Used raspi-config for configuration. :-(

jtarrico
Posts: 1
Joined: Sun Oct 01, 2017 7:54 am

Re: raspi-config doesn't set locale

Sun Oct 01, 2017 7:57 am

I was having this same issue today. Try adding the following


export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_TYPE=en_US.UTF-8

Return to “Debian”

Who is online

Users browsing this forum: No registered users and 5 guests