Warning: setlocale: LC_ALL: cannot change locale

How to solve this problem? this comes to my email when running cron

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (ru_RU.UTF-8)

sudo /usr/local/hestia/bin/v-update-sys-queue restart

Try to reconfigure locales.

As root:

dpkg-reconfigure locales

And add ru_RU.UTF-8 UTF-8

1 Like

Didn’t help, the error remains.

how to fix? Debian 12

As root, show the output of;

locale
locale -a
locale-gen
crontab -l -u admin | sed 's/@.*/@example.com/g'
1 Like

I already solved the problem, here is the solution that helped me.

echo "LC_ALL=ru_RU.UTF-8" | sudo tee -a /etc/environment
echo "ru_RU.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
echo "LANG=ru_RU.UTF-8" | sudo tee -a /etc/locale.conf
sudo locale-gen ru_RU.UTF-8
2 Likes