[yocto] building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale.

Uwe Geuder jrswdnan22 at snkmail.com
Wed Apr 25 00:41:41 PDT 2018


On Tue, Apr 24, 2018 at 9:04 PM, John Smith <john-s-84 at gmx.net>:
> bitbake stops with this error message: "Your system needs to support the en_US.UTF-8 locale."
>
> export LC_ALL=en_US.UTF-8 has no effect. Do you know how to fix that
> error?

Use "locale -a" to show what locales your system supports at the
moment. It appears that en_US.UTF-8 is not on the list.

Installing/building additional locales is distro specific and out of
scope for this list. Please use your favorite search engine to find out
how to do it for your distro or ask in your friendly distro support forum
if necessary.

Exporting the environment variable just tells other programs what to
use. It does not help to tell them to use something that is not
installed. For bitbake you don't have to tell it anything, it insists on
using en_US.UTF-8 anyway as the error message shows.

Bitbake uses Python. To make things more confusing the locales in Python
are not necessarily named the same way as in your underlying distro and
there can be aliases.

In the end this code needs to run without returning an error

$ python
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
'en_US.UTF-8'

E.g. in Ubuntu the locale is listed by "locale -a" as en_US.utf8 but that
works fine.

Regards,

Uwe Geuder
Neuro Event Labs Oy
Tampere, Finland
uwe.gexder at neuroeventlabs.com (Bot check: fix one obvious typo)



More information about the yocto mailing list