After a long period dormant, system update result is locale error when booting

Now boots into terminal mode vice xfce4 as before after very large system update.

  • I have remote access *
ljohnson@192.168.0.4's password:
Last login: Wed Apr  9 15:35:56 2025 from 192.168.0.7
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
[ljohnson@KISE-004 ~]$ sudo -i
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
[root@KISE-004 ~]# 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
C.utf8
POSIX
[root@KISE-004 ~]#


Expected locale ‘LANG=en_US.UTF-8’

For the sake of clarity, please define what was meant by “After a long period dormant”. Do you mean to imply that Manjaro has not been updated in a long time? If so, how long?

Please provide system information as described (below). This may be useful for those who might wish to help.

Please also expand on your issue as much as possible.

Regards.


Welcome to the Manjaro community

As a new or infrequent forum user, please take some time to familiarise yourself with Forum requirements, and the many ways to use the forum to your benefit:


Update Announcements

The Update Announcements contain important information and a Known Issues and Solutions section that should generally be checked before posting a request for support.

System Information

Output of this command (formatted according to forum requirements) may be useful for those wishing to help:

inxi --filter --verbosity=8

or the short form:

inxi -zv8

Be prepared to provide more information and outputs from other commands whenever asked. It’s equally important to provide as much actionable information as possible in your first post, rather than simply indicating there is a problem.

Required reading
Resources

1 Like

There is a package glibc-locales which contain all generated languages as opposed to selectively enable them in /etc/locale.gen, then generate the select locale(s) using sudo locale-gen.

I cannot say what has happened - I would investigate if /usr/lib/locale is empty and if so look into /var/log/pacman.log to identify related transactions.

I would also examine the /etc/locale.gen and verify the relevant locale(s) has been correctly activated - usually at the bottom of the file - but one or more lines may have been edited for the purpose.

Likewise examine the file /etc/locale.conf for consistency.

The simplest solution may be to reinstall the glibc-locales package

pacman -Syu glibc-locales

To set the locale in all relevant places use localectl

localectl set-locale en_US.UTF-8
2 Likes

The last update of the system was end of December in 2024

Thanks linux-aarhus :slight_smile:
Investigation of /var/log/pacman.log reveals

[2025-04-08T11:51:53-0700] [ALPM] running 'detect-old-perl-modules.hook'...
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET] perl: warning: Setting locale failed.
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET] perl: warning: Please check that your locale settings:
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LANGUAGE = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_ALL = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_CTYPE = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_NUMERIC = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_COLLATE = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_TIME = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_MESSAGES = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_MONETARY = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_ADDRESS = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_IDENTIFICATION = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_MEASUREMENT = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_PAPER = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_TELEPHONE = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LC_NAME = (unset),
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     LANG = "en_US.UTF-8"
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET]     are supported and installed on your system.
[2025-04-08T11:51:53-0700] [ALPM-SCRIPTLET] perl: warning: Falling back to the standard locale ("C").

I removed linux515 and reinstalled linux61, installed glibc-locales, executed localectl set-locale en_US.UTF-8 and upgraded grub

Still no xfce4

/usr/lib/locale contains en_CA.utf8
from env LANG=en_US.UTF-8

Not ideal for a rolling release distribution; that said, it might have been even longer, and much more impractical to update.


If your /home is on a separate partition, or if you are capable of copying the content of /home to temporary location, then performing a fresh Manjaro installation might be the fastest option to return you to a relatively troublefree system.

Otherwise, the current issue(s) you are experiencing may only be the proverbial tip of the iceberg.

The latest Manjaro Installer ISO is recommended;

likewise a Ventoy USB, as a bootable ISO launcher solution:


If you don’t feel the need for a fresh installation, I’ll remind you that the Known Issues and Solutions section of every Update Announcement topic will likely be invaluable.

Regards.

3-4 months - that should not pose any significant issues.

Is it Canada having the ISO code CA? If it is the only file in /usr/lib/locale relating to english - then you need to regenerated to locale.

It could by my memory that is flaky on the subject - that happens more often than I like to admit.

Verify the following files

/etc/locale.gen

The file should contain a line at the bottom

en_US.UTF-8 UTF-8

/etc/locale.conf

LANG=en_US.UTF-8

When that is verified run

sudo locale-gen

If the en_US.UTF.8 is generated twice - then look in the sorted language list and comment the excess entry and rerun the locale-gen command.

Then recheck (example from my workstation)

 $ localectl
System Locale: LANG=en_DK.UTF-8
               LC_NUMERIC=da_DK.UTF-8
               LC_TIME=da_DK.UTF-8
               LC_MONETARY=da_DK.UTF-8
               LC_PAPER=da_DK.UTF-8
               LC_NAME=da_DK.UTF-8
               LC_ADDRESS=da_DK.UTF-8
               LC_TELEPHONE=da_DK.UTF-8
               LC_MEASUREMENT=da_DK.UTF-8
               LC_IDENTIFICATION=da_DK.UTF-8
    VC Keymap: dk
   X11 Layout: dk
    X11 Model: pc105
  X11 Options: terminate:ctrl_alt_bksp

I am ashamed to say after running the command ‘startxfce4’ the system launched xfce4

:neutral_face:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.