Announcement

Collapse
No announcement yet.

Cannot set LC LOCALE to default locale No such file or directory

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Cannot set LC LOCALE to default locale No such file or directory

    Turned my computer on this morning and had two problems not seen yesterday.

    (1) My Thunderbird screen is entirely black, as are the windows it pops up for entering passwords. Totally unuseable.

    (2) My locales are screwed up.

    Don't remember just when I noticed the second pb, but it was in trying to resolve the first. I found this on the Internet:

    Gtk-WARNING **: Locale not supported by C library." at http://askubuntu.com/questions/35975...g-apps-from-th.

    Following their suggestions did not help. Kept getting similar errors at every step. Examples:

    locale
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=en_US.UTF-8
    LANGUAGE=en_US
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME=oc_FR.UTF-8
    ...

    $ sudo apt-get purge locales
    ...
    Broken language-pack-en:amd64 Depends on language-pack-en-base [ amd64 ] < 1:16.04+20160627 > ( translations ) (>= 1:16.04+20160627)
    Considering language-pack-en-base:amd64 10001 as a solution to language-pack-en:amd64 4
    ...
    $ sudo dpkg-reconfigure locales
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US",
    LC_ALL = (unset),
    LC_TIME = "oc_FR.UTF-8",
    LANG = "en_US.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

    I've attached the complete console trace.

    What in the world is going on here. This just happened overnight. Maybe because I did a dist-upgrade yesterday but it just got booted this morning.

    I'm in Neon, evidently, with yesterday's dist-upgrade.
    $ uname -a
    Linux jon-neon 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

    Does anyone think the two pbs are related? Thunderbird in safe mode gives the same pb.
    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

    #2
    Screwy Locale.

    I've been having the same problem for some time, and upgrade from 16.10 to17.04 hasn't cured it. Main symptom was inability to set LC_ALL, and I didn't realise this was stopping me from playing Aisleriot until just now when I did this in Konsole:
    ~$ aisleriot
    aisleriot: command not found

    [OK, so Menu Editor to find the magic incantation...]

    ~$ sol
    Non UTF-8 locale (ANSI_X3.4-1968) is not supported!
    dexy@dexy-hp:~$ info locale
    dexy@dexy-hp:~$ locale
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=en_NZ.UTF-8
    LANGUAGE=en_GB:en_US
    LC_CTYPE="en_NZ.UTF-8"
    LC_NUMERIC=mi_NZ.UTF-8
    LC_TIME="en_NZ.UTF-8"
    LC_COLLATE="en_NZ.UTF-8"
    LC_MONETARY="en_NZ.UTF-8"
    LC_MESSAGES="en_NZ.UTF-8"
    LC_PAPER="en_NZ.UTF-8"
    LC_NAME="en_NZ.UTF-8"
    LC_ADDRESS="en_NZ.UTF-8"
    LC_TELEPHONE="en_NZ.UTF-8"
    LC_MEASUREMENT=mi_NZ.UTF-8
    LC_IDENTIFICATION="en_NZ.UTF-8"
    LC_ALL=
    ~$

    info locale (and man locale) give me no clue on how to set this or what locale actually does, and there doesn't seem to be any Non UTF-8 locale (ANSI_X3.4-1968) in there - why is this screwing up the system? (not-quite-newbie question)

    Comment


      #3
      Maybe https://plus.google.com/+MattiasAnde...ts/7Kb63PfVdVa
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Here is my locale:
        :~$ locale
        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=
        and, as you can see, my LC_ALL is not set either.

        You can try one of the solutions given here.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          [SOLVED] ! Thanks to GreyGeek's pointer, lampak's solution:
          LC_ALL="en_GB.utf8"
          added to /etc/environment (of course for me it's en_NZ!) and reboot.

          cepal's (correct?) sudo locale-gen en_US.UTF-8 didn't change /etc/environment, but I didn't try locale again.

          Ultimate joy! No more withdrawal symptoms from lack of 'sol'

          Thanks, all.

          Comment


            #6
            Mine is pretty much the same as GreyGeek's, except for

            LC_TIME=fr_FR.UTF-8

            in order to get the correct time zone here in France.

            $ locale
            LANG=en_US.UTF-8
            LANGUAGE=en_US
            LC_CTYPE="en_US.UTF-8"
            LC_NUMERIC="en_US.UTF-8"
            LC_TIME=fr_FR.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=

            The crazy thing is that altho most system messages are in english

            $ apt-get inols
            E: Invalid operation inols
            $ jkl;
            jkl: command not found

            dates are in french:

            $ ll
            total 1616
            drwxr-xr-x 41 jon jon 4096 avril 16 07:03 ./
            drwxr-xr-x 4 root root 4096 févr. 20 19:50 ../
            lrwxrwxrwx 1 jon jon 23 févr. 26 09:11 2017 -> jon-files/jon-doc/2017//
            drwx------ 3 jon jon 4096 févr. 25 11:35 .adobe/

            Clearly, different parts of the system get their language parameters in different places, which I find quite odd. So where does the ls command get its?
            'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

            Comment


              #7
              You can force ls to use "locale" by using the --time-style= switch
              http://www.tecmint.com/linux-ls-command-tricks/



              Sent from my iPhone using Tapatalk
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                Don't understand what locale refers to here:

                $ ls -l --time-style=locale
                total 60
                lrwxrwxrwx 1 jon jon 23 févr. 26 09:11 2017 -> jon-files/jon-doc/2017/
                drwxr-xr-x 2 jon jon 4096 mars 1 08:02 Desktop
                drwxr-xr-x 2 jon jon 4096 févr. 19 12:24 Documents
                drwxr-xr-x 2 jon jon 4096 avril 10 14:53 Downloads
                drwxr-xr-x 2 jon jon 4096 mars 20 15:35 dwhelper

                Still in french.
                'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

                Comment

                Working...
                X