How-to fix "Warning: No support for locale: en_US.utf"

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

How-to fix "Warning: No support for locale: en_US.utf"

Post by powerhouse »

Linux Mint 13 (and subsequent releases 14, 15, 16, 17, and 18) introduced some changes regarding local language support and how it's setup. As a result, you will see the following warning, for example when running update-initramfs:
Warning: No support for locale: en_US.utf8
This is because locale-gen is using an archive file to store all the locales, but many utilities are still looking for the locale files.

Have a look at /usr/lib/locale/. If your output looks like this, read on:

Code: Select all

# ls /usr/lib/locale/
C.UTF-8  locale-archive
The warning isn't critical, as far as I can tell. However, user austin.texas reported that the remedy below also fixed the sort order in his file browser. So if this bothers you or causes troubles, try the following in a terminal window:

Code: Select all

sudo locale-gen --purge --no-archive
This command purges (deletes) the archive file and replaces it with the .utf8 files.

Code: Select all

# ls /usr/lib/locale/
C.UTF-8     de_LI.utf8  en_CA.utf8  en_IN       en_US.utf8
de_AT.utf8  de_LU.utf8  en_DK.utf8  en_NG       en_ZA.utf8
de_BE.utf8  en_AG       en_GB.utf8  en_NZ.utf8  en_ZM
de_CH.utf8  en_AU.utf8  en_HK.utf8  en_PH.utf8  en_ZW.utf8
de_DE.utf8  en_BW.utf8  en_IE.utf8  en_SG.utf8
Remark: The above output represents the English and German locale files, your output may be different depending on the languages you selected.
Last edited by powerhouse on Mon Jan 08, 2018 5:10 pm, edited 5 times in total.
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by xenopeek »

Thanks! I had been wondering about that error :)
Image
User avatar
martywd
Level 3
Level 3
Posts: 147
Joined: Sun May 08, 2011 10:35 am
Location: TX

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by martywd »

I saw a 'fix' for this issue somewhere else. It didn't work for me.

This fix with very fine explanation does!

Code: Select all

$
marty@xxxxxx:~
$ sudo update-initramfs -u
[sudo] password for marty:
update-initramfs: Generating /boot/initrd.img-3.2.0-29-generic-pae
Warning: No support for locale: en_US.utf8
marty@xxxxxx:~
$ sudo locale-gen --purge --no-archive 
Generating locales...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
marty@xxxxxx:~
$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.2.0-29-generic-pae
marty@xxxxxx:~
$
No error(s).

Thanks 'powerhouse'
.
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by powerhouse »

xenopeek wrote:Thanks! I had been wondering about that error :)
Yep, it's one of these things that might get people worried. Hope it's going to be fixed, if only for cosmetic reasons.
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by powerhouse »

martywd wrote:I saw a 'fix' for this issue somewhere else. It didn't work for me.

This fix with very fine explanation does!

Code: Select all

$
marty@xxxxxx:~
$ sudo update-initramfs -u
[sudo] password for marty:
update-initramfs: Generating /boot/initrd.img-3.2.0-29-generic-pae
Warning: No support for locale: en_US.utf8
marty@xxxxxx:~
$ sudo locale-gen --purge --no-archive 
Generating locales...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
marty@xxxxxx:~
$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.2.0-29-generic-pae
marty@xxxxxx:~
$
No error(s).

Thanks 'powerhouse'
.

You're welcome! Though I believe it's only a cosmetic issue. Can't remember that it caused any problems. In case it gets fixed, you could run sudo locale-gen --purge to get back to the archive way of storing locales (haven't tried it though).
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
User avatar
martywd
Level 3
Level 3
Posts: 147
Joined: Sun May 08, 2011 10:35 am
Location: TX

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by martywd »

powerhouse wrote: ......
...In case it gets fixed, you could run sudo locale-gen --purge to get back to the archive way of storing locales...


I'll remember to try that if/when the fix comes along.

Thanks. Again!
.
Catbuntu

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by Catbuntu »

Thanks! The local-gen command worked like a charm. No more odd warnings!

Catbuntu
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by powerhouse »

Catbuntu wrote:Thanks! The local-gen command worked like a charm. No more odd warnings!

Catbuntu
You're welcome!
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
horirevens

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by horirevens »

martywd wrote:I saw a 'fix' for this issue somewhere else. It didn't work for me.

This fix with very fine explanation does!

Code: Select all

$
marty@xxxxxx:~
$ sudo update-initramfs -u
[sudo] password for marty:
update-initramfs: Generating /boot/initrd.img-3.2.0-29-generic-pae
Warning: No support for locale: en_US.utf8
marty@xxxxxx:~
$ sudo locale-gen --purge --no-archive 
Generating locales...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
marty@xxxxxx:~
$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.2.0-29-generic-pae
marty@xxxxxx:~
$
No error(s).

Thanks 'powerhouse'
.
It work for me too. thanks a lot :D
michalko

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by michalko »

It works for me, thanks a lot.
ddalley
Level 4
Level 4
Posts: 303
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by ddalley »

So, a year later, what are the chances of this finally getting fixed?

I presume that only one utility needs to be updated, to use the more modern method of looking for locales.
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by powerhouse »

ddalley wrote:So, a year later, what are the chances of this finally getting fixed?

I presume that only one utility needs to be updated, to use the more modern method of looking for locales.
Just for reference, I'm NOT following my own instructions, that is I use the new locales format (archive file) for over a year now and I never had any issue with it. With certain updates it throws error messages at me, but that is all - no problems whatsoever. Perhaps this is the reason no one bothers with it: if it ain't broke, don't fix it!
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by xenopeek »

It doesn't throw errors at you powerhouse, it throws a warning :wink:
Image
User avatar
FabioBeneditto
Level 1
Level 1
Posts: 7
Joined: Sat Jan 11, 2014 11:27 am
Location: Ivoti, RS (Brazil)
Contact:

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by FabioBeneditto »

Hi!

Works fine to me! :mrgreen:

Thanks for sharing your knowledge :D
:wq
Fabio Beneditto
"A hacker does for love what others would not do for money."
"A Vida é mais bela quando vista de cima de uma motocicleta.
"
Linux Mint 17.3 Mate (at Work) / XFCE (at Mobile / Home)
Adelante

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by Adelante »

Thanks a lot. It always bugs me.
powerhouse wrote:The warning isn't critical, as far as I can tell, but if it bothers you or causes troubles, try the following in a terminal window:

Code: Select all

sudo locale-gen --purge --no-archive
This command purges (deletes) the archive file and replaces it with the .utf8 files.
Tz2001

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by Tz2001 »

Thanks! I'd seen this error when installing things via apt all the time, however because I'm on en_GB I'd always assumed it was because whatever software I'd installed only had translations for en_US and not the GB version.
thanosfrag

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by thanosfrag »

Thanks powerhouse. It did work perfectly well.
GRAVEL
Level 1
Level 1
Posts: 19
Joined: Wed Mar 26, 2014 5:58 am

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by GRAVEL »

Thank you for this info,
sincerely,

Roger
ack0329

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by ack0329 »

Awesome and thanks - been bugging me so often :D
KabirGandhiok

Re: How-to fix "Warning: No support for locale: en_US.utf"

Post by KabirGandhiok »

Thanks so much for this. I've been getting this warning whenever I run apt-get upgrade and it doesn't let me go further into the upgrade. I'm glad this won't bother me any more :-)
Locked

Return to “Tutorials”