setlocale: LC_ALL: cannot change locale (0.UTF-8) Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
hungryguy

Re: setlocale: LC_ALL: cannot change locale (0.UTF-8)

Post by hungryguy »

alessandro.psrt wrote:It happen to me when I removed a package that now I can't remember exactly. Look in /etc/environment and change 0.UTF-8 to your locale, or comment according to https://wiki.debian.org/Locale#Standard.

Hope this helps.
Thanks, that worked . I was able to edit the /etc/environment to change locacle as you suggested.
:P
alessandro.psrt
Posts: 16
Joined: Tue Dec 06, 2016 2:34 pm

Re: setlocale: LC_ALL: cannot change locale (0.UTF-8)

Post by alessandro.psrt »

If I remember right it happen when passing from dropbear to openssh in a non-fresh install.
spanx20
Posts: 9
Joined: Tue Jan 31, 2017 2:49 pm

Re: setlocale: LC_ALL: cannot change locale (0.UTF-8)

Post by spanx20 »

Hi,

I've got the same problem and i've tried these solutions.... close, but no sigar.

Can anyone help me?
spanx20
Posts: 9
Joined: Tue Jan 31, 2017 2:49 pm

Re: setlocale: LC_ALL: cannot change locale (0.UTF-8)

Post by spanx20 »

*bump*

anyone?
vinanrra
Posts: 13
Joined: Mon Oct 24, 2016 5:57 pm

Re: setlocale: LC_ALL: cannot change locale (0.UTF-8)

Post by vinanrra »

Having same problem with fresh install.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: setlocale: LC_ALL: cannot change locale (0.UTF-8)

Post by johnvick »

I had same fixed by:

/etc/environment

Code: Select all

LC_ALL=en_GB.UTF-8
LANG=en_GB.UTF-8
sakal
Posts: 12
Joined: Tue Mar 21, 2017 10:32 am

Re: setlocale: LC_ALL: cannot change locale (0.UTF-8)

Post by sakal »

Easy fix work for me:
root@raspberrypi:~$ export LANGUAGE=en_US.UTF-8
root@raspberrypi:~$ export LANG=en_US.UTF-8
root@raspberrypi:~$ export LC_ALL=en_US.UTF-8
root@raspberrypi:~$ locale-gen en_US.UTF-8
root@raspberrypi:~$ dpkg-reconfigure locales
as soon as I run the last I was asked to choose the locale to generate. My choice was en_US-UTF.8

That’s all, the annoying message disappear!
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: setlocale: LC_ALL: cannot change locale (0.UTF-8)

Post by Fourdee »

johnvick wrote:I had same fixed by:

/etc/environment

Code: Select all

LC_ALL=en_GB.UTF-8
LANG=en_GB.UTF-8
Thanks John,

Bizarre, I'am still yet to experience the reported 0.UTF-8 issue, on any board (and I go through alot, testing most days lol :)).

Still unsure what the cause of this is, but we can look at applying John's fix into DietPi by default to try and prevent this for our users:
https://github.com/Fourdee/DietPi/issues/825
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: setlocale: LC_ALL: cannot change locale (0.UTF-8)

Post by Fourdee »

Ok, John's fix is coming in v147.

John, any chance you could you check if setting current default locale into /etc/environment results in the 0.UTF-8 issue reoccurring?

Get current locale:

Code: Select all

cat /etc/default/locale | grep -m1 '^LANG=' | sed 's/.*=//'
Then replace /etc/environment entries accordingly.
Reboot.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply