当我尝试从 Azure 运行管道构建时,出现以下错误片段。
2024-06-18T06:02:45.1075555Z Your configuration files at build have not been touched.
2024-06-18T06:02:45.3914362Z Traceback (most recent call last):
2024-06-18T06:02:45.3915081Z File "/build/sources/poky/bitbake/bin/bitbake", line 28, in <module>
2024-06-18T06:02:45.3915488Z bb.utils.check_system_locale()
2024-06-18T06:02:45.3915863Z File "/build/sources/poky/bitbake/lib/bb/utils.py", line 619, in check_system_locale
2024-06-18T06:02:45.3916530Z locale.setlocale(locale.LC_CTYPE, default_locale)
2024-06-18T06:02:45.3916923Z File "/usr/lib/python3.10/locale.py", line 620, in setlocale
2024-06-18T06:02:45.3917257Z return _setlocale(category, locale)
2024-06-18T06:02:45.3917582Z locale.Error: unsupported locale setting
2024-06-18T06:02:45.5578186Z Traceback (most recent call last):
2024-06-18T06:02:45.5578712Z File "/build/sources/poky/bitbake/bin/bitbake", line 28, in <module>
2024-06-18T06:02:45.5579048Z bb.utils.check_system_locale()
2024-06-18T06:02:45.5579380Z File "/build/sources/poky/bitbake/lib/bb/utils.py", line 619, in check_system_locale
2024-06-18T06:02:45.5579767Z locale.setlocale(locale.LC_CTYPE, default_locale)
2024-06-18T06:02:45.5580111Z File "/usr/lib/python3.10/locale.py", line 620, in setlocale
2024-06-18T06:02:45.5580420Z return _setlocale(category, locale)
2024-06-18T06:02:45.5580696Z locale.Error: unsupported locale setting
我点击了这些链接并正确设置了语言环境。
输出locale
:
LANG=en_US.UTF-8
LANGUAGE=en_IN:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
输出locale -a
:
C
C.utf8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX
在 中/etc/default/locale
,/etc/locale-gen
我可以正确看到“en_US.UTF-8”。我也尝试过locale-gen
,sudo dpkg-reconfigure locales
按照所附链接。
在服务器/终端本地,我能够运行 bitbake。我可以看到正确的 LC_CTYPE/LC_ALL 变量/值被正确设置/反映。
bitbake machine1-image
当我登录终端时工作正常。
但是,当我从 Azure 管道对构建进行排队时,它会失败并出现错误。
**
- 关注的链接:
https://stackoverflow.com/questions/65525716/why-do-i-get-a-locale-error-even-though-it-is-set
https://stackoverflow.com/questions/42090237/change-locale-setting-in-yocto?rq=3
https://stackoverflow.com/questions/78006534/python-locale-raising-unsupported-locale-setting
其他详细信息:
IBM 服务器。
22.04LTS
柯克斯通/约克托