Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've just installed Ubuntu 13.10 on my Chromebook via Chrubuntu, which doesn't appear to have set up locales correctly. My attempts to do so myself are failing. The system should be en_GB in UTF-8 mode. The output of locale -a includes en_GB.utf8. locale outputs the following:

locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE=en_GB.utf8
LC_NUMERIC=en
LC_TIME=en
LC_COLLATE=en_GB.utf8
LC_MONETARY=en
LC_MESSAGES=en_GB.utf8
LC_PAPER=en
LC_NAME=en
LC_ADDRESS=en
LC_TELEPHONE=en
LC_MEASUREMENT=en
LC_IDENTIFICATION=en
LC_ALL=

Various programs throw locale-related errors, mostly non-fatal, for example:

(process:2711): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.

However, I'm also getting crashes at bootup from Keyboard Input Methods and when attempting to use the Language Support section of System Settings. At present, my /etc/default/locale file reads as follows, which was copied from the locale output on a working system (though I might have made one or two changes since then):

LANG=en_GB.utf8
LANGUAGE=
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=

At various points trying to fix this, I've managed to cause apt to throw 400 errors when trying to run apt-get update, and render the system entirely unbootable by causing mountall to crash.

I've tried various solutions I've found by Googling the problem, including running locale-gen and dkpg-reconfigure locales, with no luck.

What's going on and how can I fix it?

Edit: So setting LC_ALL=en_GB.utf8 fixes the local issues, but it causes a pile of error messages when I try and SSH into other machines that don't have en_GB.utf8 available. This doesn't happen on my other Ubuntu boxes, so there must be a way of getting the local settings sorted without setting LC_ALL and causing these issues.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Even if your /etc/default/locale looks correct, I recommend that you change it to just contain

LANG=en_GB.UTF-8

(which in effect is the same thing).

But the problem seems to be that something in your user settings messes up the locale. I don't know anything about Chrubuntu, but assuming that you have access to the Ubuntu GUI for setting languages, I suggest that you go to System Settings -> Language Support and explicitly set both the language and the regional formats from there.

In any case, it's never ever a good idea to set LC_ALL via /etc/default/locale.

share|improve this answer
    
Chrubuntu is just some magic for getting Ubuntu installed and booting with Chromebooks' weird bootloader - it should be stock Ubuntu once installed. My Language Support settings are set to English (United Kingdom) on both Language and Regional Formats tabs. Setting that value in /etc/default/locale causes the errors described in the first post. –  Sam Oct 20 '13 at 14:52
    
@Sam: What if you change the regional formats to something else, and then back to "English (United Kingdom)"? I suggest you do that, then log out and log in again, open a terminal window and run the locale command. –  Gunnar Hjalmarsson Oct 20 '13 at 19:33
    
Wiping my /etc/default/locale and then doing that did fix it, thank you. –  Sam Oct 20 '13 at 20:37
    
I've been dealing with the exact same issue for weeks. No answers out there worked for me. Finally, deleting /etc/default/locale and resetting my language as recommended worked. Thank you! –  Andrew Jan 6 at 20:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.