Yocto btbake error

Hi,

I have followed all the instructions from Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center
I have set the following in oe-core/build/conf/local.conf -
MACHINE ?= “colibri-imx6ull”
ACCEPT_FSL_EULA = “1”

Finally, when I am trying to build the minimal image I get an error.

here is the error -
mansij@mansij-Inspiron-N5050:~/oe-core/build$ bitbake tdx-reference-minimal-image
Traceback (most recent call last):
File “/home/mansij/oe-core/layers/openembedded-core/bitbake/bin/bitbake”, line 28, in
bb.utils.check_system_locale()
File “/home/mansij/oe-core/layers/openembedded-core/bitbake/lib/bb/utils.py”, line 620, in check_system_locale
locale.setlocale(locale.LC_CTYPE, default_locale)
File “/usr/lib/python3.10/locale.py”, line 620, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

Could you please help?

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

The error you’re encountering, locale.Error: unsupported locale setting, typically occurs when the system’s locale is not set to a supported value. This can cause Python scripts, such as those used by bitbake, to fail.

To resolve this issue, you can set your locale to a commonly supported setting like en_US.UTF-8. Here’s how you can do it:

  1. Open a terminal on your host machine.
  2. Run the following command to set the locale:
    export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8
    
  3. You may also need to generate the locale if it is not already available. You can do this by running:
    sudo locale-gen en_US.UTF-8
    sudo update-locale
    
  4. After setting the locale, try running the bitbake command again.

These steps should help resolve the locale error and allow you to proceed with building your image. If the problem persists, ensure that your system’s locale settings are correctly configured in your operating system’s settings.

Best regards,
Toradex AI Assistant.

Please, also check if these links can help you solve your problem:

Python3 update error on Colibri iMX6ull.

Hi @mansijc!

I saw that you marked the answer from our AI with a “positive thumb”. Were you able to solve your problem?

Best regards.
Lucas Azeituno