Announcement

Collapse
No announcement yet.

Perl warning about lack of a locale setting?

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

    [SOLVED] Perl warning about lack of a locale setting?

    Using a brand new KDEneon install. I still do my updates from the command line. Since I began using this install, I have noticed this message and warning every time I "full-upgrade" with apt:

    Fetched 51.2 MB in 21s (2394 kB/s)
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "",
    LC_ALL = (unset),
    LC_TIME = "en_US.UTF-8",
    LC_MONETARY = "en_US.UTF-8",
    LC_ADDRESS = "en_US.UTF-8",
    LC_TELEPHONE = "en_US.UTF-8",
    LC_NAME = "en_US.UTF-8",
    LC_MEASUREMENT = "en_US.UTF-8",
    LC_IDENTIFICATION = "en_US.UTF-8",
    LC_NUMERIC = "en_US.UTF-8",
    LC_PAPER = "letter",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
    locale: Cannot set LC_ALL to default locale: No such file or directory
    I've done some looking about on the web and attempted all the recommended fixes, but nothing seems to stick. I set the missing locales, but they disappear at each reboot.

    It doesn't seem to cause any actual problems, I'm mostly wondering if anyone else is getting this. I can fix it by adding the exports to my .profile, but I am curious if this is a "bug" or just a nothing-burger.

    Please Read Me
  • Answer selected by Snowhog at Jan 04, 2023, 09:01 AM.

    Originally posted by Schwarzer Kater View Post

    So you have already set LC_ALL in /etc/default/locale to en_US.UTF-8?
    Yes, like a billion times, lol. It resets after reboot : see my first post: "I set the missing locales, but they disappear at each reboot."


    Turns out I was missing a package for some reason: language-selector-common

    I installed that and the issue went away.

    Comment


      #2
      I am not seeing this here on my PC. At least not today, though I think I would notice this,. I also do the vast majority of my updates on the command line, 100% of the time on my desktop.
      Perhaps whatever updates I have had simply haven't invoked perl? This seems unlikely.

      Comment


        #3
        I’ve never seen this on my neon install. I too, do all my package management and system updates/upgrades from the CLI.
        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
          I have it. Seems to default to the correct local anyway, so I just ignore it.

          Oh, and it is also present in kubuntu 22.04 LTS
          Last edited by ShadYoung; Jan 03, 2023, 07:49 PM.

          Comment


            #5
            Originally posted by oshunluvr View Post
            […] I've done some looking about on the web and attempted all the recommended fixes, but nothing seems to stick. I set the missing locales, but they disappear at each reboot. […]
            So you have already set LC_ALL in /etc/default/locale to en_US.UTF-8?
            Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
            Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

            get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
            install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

            Comment


              #6
              Originally posted by Schwarzer Kater View Post

              So you have already set LC_ALL in /etc/default/locale to en_US.UTF-8?
              Yes, like a billion times, lol. It resets after reboot : see my first post: "I set the missing locales, but they disappear at each reboot."


              Turns out I was missing a package for some reason: language-selector-common

              I installed that and the issue went away.

              Please Read Me

              Comment


                #7
                Originally posted by oshunluvr View Post

                Yes, like a billion times, lol. It resets after reboot : see my first post: "I set the missing locales, but they disappear at each reboot."


                Turns out I was missing a package for some reason: language-selector-common

                I installed that and the issue went away.
                I wonder why I don't see this when I update. I definitely don't have this package on any of my systems. I know a lot of packaging pre- and post- install/remove scripts use perl, so you'd think I'd have seen this by now. I will keep my eye open more, I guess.
                I don't have the LC_ALL option even listed in my /etc/default/locale here.

                I wonder what is resetting yours to something else?




                For rabbit-holing/squirrel-chasing and job-avoidance:

                Kubuntu's /etc/default/locale:

                Code:
                # File generated by update-locale
                LANG="en_US.UTF-8"​

                And on two different Neon systems I have this:
                Code:
                LANG=en_US.UTF-8
                LC_ADDRESS=en_US.UTF-8
                LC_IDENTIFICATION=en_US.UTF-8
                LC_MEASUREMENT=en_US.UTF-8
                LC_MONETARY=en_US.UTF-8
                LC_NAME=en_US.UTF-8
                LC_NUMERIC=en_US.UTF-8
                LC_PAPER=en_US.UTF-8
                LC_TELEPHONE=en_US.UTF-8
                LC_TIME=en_US.UTF-8


                I assume the difference being the installers (Ubiquity versus Calamares) probably using different tools, templates or settings defining this.

                And of course this probably has no bearing on why you see the error messaging, and others are not

                Comment


                  #8
                  Originally posted by claydoh View Post
                  I definitely don't have this package on any of my systems.
                  Same at here on my neon. However, on my 22.10, it is installed.
                  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


                    #9
                    Originally posted by oshunluvr View Post
                    […] Turns out I was missing a package for some reason: language-selector-common
                    I installed that and the issue went away.
                    I am glad you found a solution. But like in claydoh 's and Snowhog 's it was not installed in my KDE neon system and I have not experienced any problems during the few weeks I have had neon running as a test.

                    It is installed in all other (xyz)Ubuntu systems here by default.

                    Originally posted by claydoh View Post
                    […] I don't have the LC_ALL option even listed in my /etc/default/locale here.​ […]
                    Nor had I, but I had to set LC_ALL=de_DE.UTF-8 manually in /etc/default/locale for KDE neon - otherwise parts of the GUI would remain English despite the setting in Systemsettings.
                    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                    Comment


                      #10
                      I get something similar every time I run a perl script:

                      perl: warning: Setting locale failed.
                      perl: warning: Please check that your locale settings:
                      LANGUAGE = "en_US",
                      LC_ALL = (unset),
                      LC_ADDRESS = "en_US.UTF-8",
                      LC_NAME = "en_US.UTF-8",
                      LC_MONETARY = "en_US.UTF-8",
                      LC_PAPER = "en_US.UTF-8",
                      LC_IDENTIFICATION = "en_US.UTF-8",
                      LC_TELEPHONE = "en_US.UTF-8",
                      LC_MEASUREMENT = "fr_FR.UTF-8",
                      LC_TIME = "fr_FR.UTF-8",
                      LC_NUMERIC = "en_US.UTF-8",
                      LANG = "en_US.UTF-8"
                      are supported and installed on your system.
                      perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
                      It's true that I have a rather mixed system. I live in France and so want french time, date and paper parameters, for instance. But I want an english keyboard and sytem language. Here's another example.

                      $ 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=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=fr_FR.UTF-8
                      LC_IDENTIFICATION=en_US.UTF-8
                      LC_ALL=
                      Should I set LC_ALL to something somewhere maybe?


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

                      Comment


                        #11
                        On my 22.10:
                        Code:
                        $ locale
                        LANG=en_NZ.UTF-8
                        LANGUAGE=en_GB:en_US
                        LC_CTYPE="en_NZ.UTF-8"
                        LC_NUMERIC="en_NZ.UTF-8"
                        LC_TIME=en_DK.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="en_NZ.UTF-8"
                        LC_IDENTIFICATION="en_NZ.UTF-8"
                        LC_ALL=​
                        so LC_ALL= is not a problem. askubuntu.com suggests running
                        Code:
                        sudo dpkg-reconfigure locales
                        Regards, John Little

                        Comment


                          #12
                          sudo dpkg-reconfigure locales

                          seems to generate locales, so I've generated en_US and fr_FR, but now how do I use them? My perl script outputs have not changed.
                          '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