Failed to set locale, defaulting to C.UTF-8


This is less an issue and more an annoyance, idk if this is something i should put on the github issue tracker or not thanks to this maybe just being able to be solved by a config or terminal command instead of a repo or inherent easily identifiable distro error. But as will be described below this is a warning given to the system whenever dnf install is used.

  • OpenMandriva Lx version:
    ROME Slim

  • Desktop environment (KDE, LXQT…):

  • Description of the issue (screenshots if relevant):
    Whenever trying to install any program through the terminal using sudo dnf install the warning Failed to set locale, defaulting to C.UTF-8 is given first before normal operations happen after.

My default language has not been set to english, but to portuguese: pt_BR.UTF-8.
I set it through the KDE settings and during install (despite after install being set back to english again automatically.)

  • Relevant informations (hardware involved, software version, logs or output…):
    Samsung NP300E5M is the hardware used as per my usual forum posts. As informed before Portuguese was set as default by installation but the system still went to english after install, so the language now set is through KDE Settings.

I don’t know if you already made a search in Resources section, there are some useful guides there:
How to make the 'slim' ISO localized in your own language

Let us know if it did help.

1 Like

When doing the step of changing the region and language settings in kde i did as asked, kde asked to give a root password and gave the following warning:

“It wasn’t possible to find the executable locale-gen” @rugyada

glibc is installed, locales-pt is installed, systemd-locale and locales are all installed, but the locale-gen command doesn’t exist in the system somehow.

However the warning on the terminal has gone away

locale-gen isn’t supposed to exist, that’s a Debian-ism.
We just need to remove the reference to it from the settings dialog.

Literally Arch and Fedora and OpenSUSE has it. KDE, Gnome and a bunch of other programs use it, and it is documented under glibc original documentation. What do you mean Debian-ism?

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