Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: cannot set en_US locale

  1. #1
    Join Date
    Jan 2011
    Beans
    6

    Exclamation cannot set en_US locale

    I am new to Ubuntu but have been running opensuse for some time.
    I have installed Ubuntu 10.10x64 on an HP Envy 173D laptop and am having locale problems. Here are some of the commands I have attempted:

    attempt 1:
    sudo locale -a
    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_COLLATE to default locale: No such file or directory
    C
    POSIX
    en_AG
    en_AG.utf8
    en_AU.utf8
    en_BW.utf8
    en_CA.utf8
    en_DK.utf8
    en_GB.utf8
    en_HK.utf8
    en_IE.utf8
    en_IN
    en_IN.utf8
    en_NG
    en_NG.utf8
    en_NZ.utf8
    en_PH.utf8
    en_SG.utf8
    en_US.utf8
    en_ZA.utf8
    en_ZW.utf8
    attempt 2:
    sudo locale-gen en_US.utf8
    Generating locales...
    en_US.UTF-8... up-to-date
    Generation complete.
    attempt 3:
    sudo dpkg-reconfigure locales
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "",
    LC_ALL = (unset),
    LANG = "en_US"
    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

    Generating locales...
    en_AG.UTF-8... done
    en_AU.UTF-8... done
    en_BW.UTF-8... done
    en_CA.UTF-8... done
    en_DK.UTF-8... done
    en_GB.UTF-8... done
    en_HK.UTF-8... done
    en_IE.UTF-8... done
    en_IN.UTF-8... done
    en_NG.UTF-8... done
    en_NZ.UTF-8... done
    en_PH.UTF-8... done
    en_SG.UTF-8... done
    en_US.UTF-8... up-to-date
    en_ZA.UTF-8... done
    en_ZW.UTF-8... done
    Generation complete.
    Anyone know how to fix this issue?

    Thanks,
    draycor

  2. #2
    Join Date
    Feb 2010
    Location
    Silicon Valley
    Beans
    1,898
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: cannot set en_US locale

    Don't know if this will help, but what is in your /etc/default/locale file?
    Code:
    $ more /etc/default/locale
    LANG="en_US.UTF-8"

  3. #3
    Join Date
    Dec 2010
    Location
    Sweden
    Beans
    Hidden!

    Re: cannot set en_US locale

    Try this instead:

    Go to system > administration > locale

    There you can set your locale system-wide.

    Hope this helps you!

  4. #4
    Join Date
    Jan 2011
    Beans
    6

    Re: cannot set en_US locale

    Quote Originally Posted by gmargo View Post
    Don't know if this will help, but what is in your /etc/default/locale file?
    Code:
    $ more /etc/default/locale
    LANG="en_US.UTF-8"
    @gmargo
    I get exactly what you posted:

    more /etc/default/locale
    LANG="en_US.UTF-8"

  5. #5
    Join Date
    Jan 2011
    Beans
    6

    Re: cannot set en_US locale

    Quote Originally Posted by DanneStrat View Post
    Try this instead:

    Go to system > administration > locale

    There you can set your locale system-wide.

    Hope this helps you!
    @DanneStrat:
    My system does not have system > administration > locale.

    It does have System > Administration > Language Support
    This shows English (United States) followed by an English line. I have Clicked the "Apply System-Wide" button, but it does not seem to change anything.

  6. #6
    Join Date
    Dec 2010
    Location
    Sweden
    Beans
    Hidden!

    Re: cannot set en_US locale

    Quote Originally Posted by draycor View Post
    @DanneStrat:
    My system does not have system > administration > locale.

    It does have System > Administration > Language Support
    This shows English (United States) followed by an English line. I have Clicked the "Apply System-Wide" button, but it does not seem to change anything.
    You have to log out and back in again for the changes to apply.
    Last edited by DanneStrat; January 25th, 2011 at 06:31 PM.

  7. #7
    Join Date
    Jan 2011
    Beans
    6

    Re: cannot set en_US locale

    Quote Originally Posted by DanneStrat View Post
    You have to log out and back in again for the changes to apply.
    Thank you again, but that was tried. I even repeated the sequence and then shutdown and restarted but still no luck.

    I thought that possibly my user was not configured right and was maybe not running the language support tool with sudo. So I attempted the following in a terminal window:

    sudo /usr/bin/gnome-language-selector

    (process:2638): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
    /usr/lib/python2.6/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py:788: GtkWarning: gtk_cell_view_set_cell_data: assertion `cell_view->priv->displayed_row != NULL' failed
    cell = combo.get_child().get_cell_renderers()[0]
    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_COLLATE to default locale: No such file or directory
    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_COLLATE to default locale: No such file or directory

    The lines about "No such file or directory" repeat many times.

  8. #8
    Join Date
    Feb 2010
    Location
    Silicon Valley
    Beans
    1,898
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: cannot set en_US locale

    What files do you have under /var/lib/locales/supported.d/? Is there anything strange in your .bashrc or .profile?

    Code:
    $ ls -l /var/lib/locales/supported.d/
    total 8
    -rw-r--r-- 1 root root 270 Oct  1 02:57 en
    -rw-r--r-- 1 root root  18 Oct 22 18:07 local
    
    $ more /var/lib/locales/supported.d/en
    en_HK.UTF-8 UTF-8
    en_DK.UTF-8 UTF-8
    en_IN UTF-8
    en_ZW.UTF-8 UTF-8
    en_NZ.UTF-8 UTF-8
    en_PH.UTF-8 UTF-8
    en_NG UTF-8
    en_US.UTF-8 UTF-8
    en_GB.UTF-8 UTF-8
    en_AU.UTF-8 UTF-8
    en_SG.UTF-8 UTF-8
    en_BW.UTF-8 UTF-8
    en_AG UTF-8
    en_ZA.UTF-8 UTF-8
    en_CA.UTF-8 UTF-8
    en_IE.UTF-8 UTF-8
    
    $ more /var/lib/locales/supported.d/local
    en_US.UTF-8 UTF-8

  9. #9
    Join Date
    Jan 2011
    Beans
    6

    Re: cannot set en_US locale

    Quote Originally Posted by gmargo View Post
    What files do you have under /var/lib/locales/supported.d/? Is there anything strange in your .bashrc or .profile?

    Code:
    $ ls -l /var/lib/locales/supported.d/
    total 8
    -rw-r--r-- 1 root root 270 Oct  1 02:57 en
    -rw-r--r-- 1 root root  18 Oct 22 18:07 local
    
    $ more /var/lib/locales/supported.d/en
    en_HK.UTF-8 UTF-8
    en_DK.UTF-8 UTF-8
    en_IN UTF-8
    en_ZW.UTF-8 UTF-8
    en_NZ.UTF-8 UTF-8
    en_PH.UTF-8 UTF-8
    en_NG UTF-8
    en_US.UTF-8 UTF-8
    en_GB.UTF-8 UTF-8
    en_AU.UTF-8 UTF-8
    en_SG.UTF-8 UTF-8
    en_BW.UTF-8 UTF-8
    en_AG UTF-8
    en_ZA.UTF-8 UTF-8
    en_CA.UTF-8 UTF-8
    en_IE.UTF-8 UTF-8
    
    $ more /var/lib/locales/supported.d/local
    en_US.UTF-8 UTF-8
    Thanks for the suggestions. I do not see anything unusual in the .profile or .bashrc.

    Here are the results of the commands you suggested:

    ls -l /var/lib/locales/supported.d/
    total 8
    -rw-r--r-- 1 root root 270 Oct 1 04:57 en
    -rw-r--r-- 1 root root 18 Dec 16 09:16 local

    $ more /var/lib/locales/supported.d/en
    en_HK.UTF-8 UTF-8
    en_DK.UTF-8 UTF-8
    en_IN UTF-8
    en_ZW.UTF-8 UTF-8
    en_NZ.UTF-8 UTF-8
    en_PH.UTF-8 UTF-8
    en_NG UTF-8
    en_US.UTF-8 UTF-8
    en_GB.UTF-8 UTF-8
    en_AU.UTF-8 UTF-8
    en_SG.UTF-8 UTF-8
    en_BW.UTF-8 UTF-8
    en_AG UTF-8
    en_ZA.UTF-8 UTF-8
    en_CA.UTF-8 UTF-8
    en_IE.UTF-8 UTF-8

    $ more /var/lib/locales/supported.d/local
    en_US.UTF-8 UTF-8

  10. #10
    Join Date
    Jan 2011
    Beans
    1

    Re: cannot set en_US locale

    You're trying to use the en_US locale, but it doesn't exist on your machine. The en_US.UTF-8 locale is a different locale. To create the en_US locale, run:

    # locale-gen en_US
    Generating locales...
    en_US.ISO-8859-1... done
    Generation complete.

    and you should be good to go.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •