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

Thread: perl: warning: Setting locale failed.

  1. #1

    Default perl: warning: Setting locale failed.

    I am using the asdf version manager
    to use different rub and node versions

    When I run asdf I get the following message:

    Code:
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LANGUAGE = "en_US:de:sv",
            LC_ALL = (unset),
            LANG = "en_SE.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    now I have 2 questions:

    I am using asdf on many installations since some years now, never had this problem (including Leap 14.2)
    why do I get this message?
    what do I need to get rid of this?

    thanks for help!

  2. #2
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,559

    Question Re: perl: warning: Setting locale failed.

    Please post the following:
    1. For the user who is experiencing the Perl warnings, the output of the CLI command 'locale'.
    2. For the user who is experiencing the Perl warnings, from the file ~/.profile the 'LANG=' setting.
    3. The content of the system file '/etc/locale.conf'.

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,760

    Default Re: perl: warning: Setting locale failed.

    May check the ownership of the local files.

  4. #4

    Default Re: perl: warning: Setting locale failed.

    sure,

    Code:
    locale
    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
    LANG=en_SE.UTF-8
    LC_CTYPE="en_SE.UTF-8"
    LC_NUMERIC="en_SE.UTF-8"
    LC_TIME="en_SE.UTF-8"
    LC_COLLATE="en_SE.UTF-8"
    LC_MONETARY="en_SE.UTF-8"
    LC_MESSAGES="en_SE.UTF-8"
    LC_PAPER="en_SE.UTF-8"
    LC_NAME="en_SE.UTF-8"
    LC_ADDRESS="en_SE.UTF-8"
    LC_TELEPHONE="en_SE.UTF-8"
    LC_MEASUREMENT="en_SE.UTF-8"
    LC_IDENTIFICATION="en_SE.UTF-8"
    LC_ALL=
    nothing set in .profile

    please not, I have meanwhile removed the preferred languages settings from KDE, which have been yesterday english/sedish/german, now it's just english

    Code:
    cat /etc/locale.conf
    LANG=en_US.UTF-8
    I have the feeling that KDE does some changes. en_SE.UTF-8
    I want a english system, but Swedish date/time format, or German, don't care, 0:00 - 23:00 clock, meters, .....


    I am on a default Leap 15 installation, only special is as said the KDE regional settings, to en_SE, and that I installed German and Swedish lagnuage support via Yast

  5. #5
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,559

    Default Re: perl: warning: Setting locale failed.

    Quote Originally Posted by a4z View Post
    Code:
    locale
    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
    LANG=en_SE.UTF-8
    LC_CTYPE="en_SE.UTF-8"
    LC_NUMERIC="en_SE.UTF-8"
    LC_TIME="en_SE.UTF-8"
    LC_COLLATE="en_SE.UTF-8"
    LC_MONETARY="en_SE.UTF-8"
    LC_MESSAGES="en_SE.UTF-8"
    LC_PAPER="en_SE.UTF-8"
    LC_NAME="en_SE.UTF-8"
    LC_ADDRESS="en_SE.UTF-8"
    LC_TELEPHONE="en_SE.UTF-8"
    LC_MEASUREMENT="en_SE.UTF-8"
    LC_IDENTIFICATION="en_SE.UTF-8"
    LC_ALL=
    The 'locale' "Cannot set" warnings are suspicious …
    Please check your installation: with the user "root": "zypper verify --details", "rpm --verify --all" and "rcrpmconfigcheck" …
    Please correct any system configuration files as indicated by "rcrpmconfigcheck" -- usually about ½ a day's effort (with the associated research) required …

    Quote Originally Posted by a4z View Post
    nothing set in .profile
    Then, it is recommended to do so: applications being executed by a user -- including things such as the human GUI -- read ~/.profile when they start …

    Quote Originally Posted by a4z View Post
    please not, I have meanwhile removed the preferred languages settings from KDE, which have been yesterday english/sedish/german, now it's just english
    KDE reads the system Locale and the user's Locale (from ~/.profile) when starting -- then, this can be changed via KDE's "System Settings" and, the KDE Locale setting is stored in a ~/.config/ KDE settings file …

    Quote Originally Posted by a4z View Post
    Code:
    cat /etc/locale.conf
    LANG=en_US.UTF-8
    Is OK.

    Quote Originally Posted by a4z View Post
    I have the feeling that KDE does some changes. en_SE.UTF-8
    I want a english system, but Swedish date/time format, or German, don't care, 0:00 - 23:00 clock, meters, .....
    Should be possible provided, the Locale "en_SE.UTF-8" is nailed both as a System Locale and, a User's Locale (in ~/.profile) …
    Via KDE "System Settings" it should then be possible to confirm that, the "en_SE.UTF-8" Locale in fact has Swedish date/time and currency formats …

  6. #6

    Default Re: perl: warning: Setting locale failed.

    seems OK to me, no surprise since I did no experiments
    rcrpmconfigcheck command not found, this program is unknown
    interesting, when I sudo -i, I get also a message about $LC_* and $LANG

    Code:
    sudo -i
    /usr/bin/manpath: can't set the locale; make sure $LC_* and $LANG are correct
    t430p:~ # zypper verify --details
    Loading repository data...
    Reading installed packages...
    
    Dependencies of all installed packages are satisfied.
    t430p:~ # rpm --verify --all
    .M.......  g /var/log/alternatives.log
    .M.......  g /usr/share/fonts/100dpi/encodings.dir
    .M.......  g /usr/share/fonts/100dpi/fonts.scale
    .M.......  g /usr/share/fonts/Type1/encodings.dir
    .M.......  g /usr/share/fonts/cyrillic/encodings.dir
    .M.......  g /usr/share/fonts/cyrillic/fonts.scale
    .M.......  g /usr/share/fonts/truetype/encodings.dir
    ....L....    /usr/share/YaST2/theme/current/icons
    .M.......  g /var/lib/ca-certificates/ca-bundle.pem
    .M.......  g /var/lib/ca-certificates/java-cacerts
    S.5....T.  c /etc/sddm.conf
    .M...UG..  g /run/sddm
    .M.......  g /run/avahi-daemon
    S.5....T.  c /etc/fonts/conf.d/10-rendering-options.conf
    S.5....T.  c /etc/fonts/conf.d/58-family-prefer-local.conf
    S.5....T.  c /etc/sudoers
    .M.......  g /var/lib/sudo
    .M.......  g /var/lib/sudo/ts
    .......T.  c /etc/wicked/common.xml
    .M.......    /var/lib/PackageKit/transactions.db
    .M...U...    /var/cache/cups
    ....L....  d /usr/share/man/man1/ftp.1.gz
    .M.......  g /boot/grub2/grub.cfg
    S.5....T.  c /etc/default/grub
    .......T.  c /etc/sysconfig/network/ifcfg-lo
    ....L....  c /etc/pam.d/common-account
    ....L....  c /etc/pam.d/common-auth
    ....L....  c /etc/pam.d/common-password
    ....L....  c /etc/pam.d/common-session
    ..5....T.  c /etc/chrony.conf
    .M.......  g /var/lib/chrony/drift
    .M.......  c /etc/X11/xorg.conf.d/00-keyboard.conf
    .M.......  c /etc/locale.conf
    .M.......  c /etc/machine-id
    .M.......  c /etc/vconsole.conf
    .M.......  g /var/lib/systemd/random-seed
    S.5....T.  c /etc/postfix/main.cf
    S.5....T.  c /etc/postfix/master.cf
    S.5....T.  c /etc/unixODBC/odbcinst.ini
    .......T.  c /etc/login.defs
    .M.......  g /run/cryptsetup
    .M.......  g /run/tmux
    .M.......  g /etc/iscsi/initiatorname.iscsi                                                                                                          
    .M.......  c /etc/iscsi/iscsid.conf                                                                                                                     
    .M.......  c /var/log/audit/audit.log                                                                                                                    
    .M....G..  g /var/log/lastlog                                                                                                                              
    S.5....T.    /usr/lib/dracut/modules.d/98dracut-systemd/dracut-cmdline-ask.service                                                                           
    .......T.  c /etc/YaST2/control.xml                                                                                                                             
    ....L....    /etc/bash_completion.d/clang.sh                                                                                                                       
    .M.......  g /usr/share/fonts/75dpi/encodings.dir                                                                                                                  
    .M.......  g /usr/share/fonts/75dpi/fonts.scale                                                                                                                       
    .M.......  g /usr/share/fonts/misc/encodings.dir                                                                                                                        
    .M.......  g /usr/share/fonts/misc/fonts.scale
    .M.......  g /etc/udev/hwdb.bin
    .M.......  g /usr/lib/udev/compat-symlink-generation
    .M.......  c /var/log/NetworkManager
    S.5....T.  c /etc/speech-dispatcher/speechd.conf
    .M.......  g /etc/xml/catalog-d.xml
    .M.......  g /run/mcelog
    .M.......  g /boot/initrd-4.12.14-lp150.11-default
    ....L....    /usr/share/java/xml-commons-apis.jar
    .......T.    /usr/lib64/gconv/gconv-modules.cache
    .M.......  g /boot/initrd-4.12.14-lp150.12.16-default
    S.5....T.  c /etc/plymouth/plymouthd.conf
    .M.......  g /var/log/boot.log
    SM5....T.  c /etc/fonts/conf.d/30-metric-aliases.conf
    t430p:~ # rcrpmconfigcheck
    If 'rcrpmconfigcheck' is not a typo you can use command-not-found to lookup the package that contains it, like this:
        cnf rcrpmconfigcheck
    t430p:~ # cnf rcrpmconfigcheck
    rcrpmconfigcheck: command not found                                 
    t430p:~ #

  7. #7

    Default Re: perl: warning: Setting locale failed.

    if I remove the regional settings in KDE control center, set to unchanged, the problem message goes away

    why did KDE have to make this change, this is obviously not good ,
    KDE was so nice to set up as it is required the last 15 years or so
    now it wants to make everything smarter, but its just more stupid, I am disappointed

  8. #8
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,559

    Red face Re: perl: warning: Setting locale failed.

    Quote Originally Posted by a4z View Post
    rcrpmconfigcheck command not found, this program is unknown
    Sorry!! -- My mistake: with Leap 15.0, '/usr/sbin/rpmconfigcheck' is provided by "rpm-4.14.1" …
    (It used to be 'rcrpmconfigcheck'.)

  9. #9
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,559

    Unhappy Re: perl: warning: Setting locale failed.

    Quote Originally Posted by a4z View Post
    now it wants to make everything smarter, but its just more stupid, I am disappointed
    You're not alone with your feelings -- currently the KDE folks seem to be attempting to "please the world" …
    • IMHO they're doing a terrible job WRT achieving that goal but, yes, there are some "Why on earth did they do THAT?" issues which are being discussed in various Bug Reports which are actually "Change Requests" -- « Please change it back to be like what it used to be … »

  10. #10

    Default Re: perl: warning: Setting locale failed.

    I'm having the same kind of issue as @a4z, but I use XFCE rather than KDE, so can't try his/her "regional settings" fix (and can't find anything similar in XFCE's Settings). Can anyone help with this please?

    I'm getting locale-related errors from various programs, such as:

    [kgpg]
    Code:
    Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
    [k3b]
    Code:
    System locale charset is ANSI_X3.4-1968
    Your system's locale charset (i.e. the charset used to encode filenames) is set to ANSI_X3.4-1968. It is highly unlikely that this has been done intentionally. Most likely the locale is not set at all. An invalid setting will result in problems when creating data projects.
    Solution: To properly set the locale charset make sure the LC_* environment variables are set. Normally the distribution setup tools take care of this.
    I'm using Leap 15.0, which was updated from a working 42.2, via 42.3 (didn't check language settings in that), using the DVD followed by an online update, where the only 3rd party repo I installed was Packman. My primary language setting in YaST is British English (Detailed setting: en_GB), with Japanese installed as a secondary language. I had also previously set Japanese to primary, then reverted to British English. When logging in to XFCE, the top-right of the login screen shows correctly as "en_GB.utf8 jp" (with jp being for my Japanese keyboard).

    With this set-up I encounter the above errors, and all Japanese filenames within xfce4-terminal display as question marks. xterm does likewise. However, Thunar displays them correctly.

    Running "locale" gives:

    Code:
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=en_GB.utf8
    LC_CTYPE=en_GB.UTF-8,LANG=en_GB.UTF-8
    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=
    *I notice there's a casing and hyphen mismatch between en_GB.UTF-8 in LC_CTYPE and en_GB.utf8 in the other entries. Is this important? I've tried changing YaST's /etc/sysconfig Editor -> System -> Environment -> Language -> RC_LANG and RC_LC_ALL to "en_GB.UTF-8" and "en_GB.utf8", but the problem still occurs, even after re-logging in. FYI, the entries are still now present in YaST but, when running the locale command, LC_ALL= is always empty.

    I also tried switching the primary language to en_US in YaST, but am still encountering the same problem.

    /etc/locale.conf contains:

    Code:
    LC_CTYPE=en_GB.UTF-8,LANG=en_GB.UTF-8
    And there was nothing set in ~/.profile, so I added the following based on @dcurtisfra's advice and the commented out lines already in the file:

    Code:
    export LANG=en_GB.UTF-8
    Running locale -a shows that the following locales are available (among others):

    Code:
    en_GB
    en_GB.iso885915
    en_GB.utf8
    ...
    ja_JP.eucjp
    ja_JP.shiftjisx0213
    ja_JP.sjis
    ja_JP.utf8
    "zypper verify --details" produces no errors, giving "Dependencies of all installed packages are satisfied".

    "rpm --verify --all" gives me various "missing" entries, but I'm not sure whether I need to/how to fix everything. For example, there are various application-specific things in /opt/, and old kde3-specific ones that don't seem relevant. I can post the whole thing (3415 lines) if needed. Please let me know.

    "rpmconfigcheck" gave a variety of conflicts, which I've now fixed. It originally also gave the below warning, but nothing is given now that I've fixed the problems:

    Code:
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_CTYPE = "en_GB.UTF-8,LANG=en_GB.UTF-8",
        LANG = "en_GB.utf8"
        are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("en_GB.utf8").
    ...
    If anyone could help with this I'd very much appreciate it, as I need to use both English and Japanese on this machine.

Page 1 of 2 12 LastLast

Posting Permissions

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