我正在尝试构建petalinux项目,但是我遇到了这个错误。
shaden@shaden-Swift:~/Documents/PetalinuxProjects/1/xilinx-zcu102-2018.2$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
ERROR: OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
You system needs to support the en_US.UTF-8 locale.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ERROR: Failed to build project现场输出
shaden@shaden-Swift:~/Documents/PetalinuxProjects/1/xilinx-zcu102-2018.2$ locale
LANG=en_US.UTF-8
LANGUAGE=
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我试过(导出LANGUAGE="en_US.UTF-8"),但没有解决错误。
我的操作系统是Ubuntu18.04.6 LTS
Petalinux版本2018.2
有人知道怎么解决吗?
谢谢
发布于 2021-11-03 13:35:41
这个问题是由于Ubuntu18.04LTS(可能是一些更新的库)与Yocto / PetaLinux中包含的Python3.5不兼容造成的。
解决方法是编辑“./usr/lib/python3.5/locale.py”文件(S),并使setlocale()函数悄然失败:
def setlocale(category, locale=None):
""" Set the locale for the given category. The locale can be
a string, an iterable of two strings (language code and encoding),
or None.
Iterables are converted to strings using the locale aliasing
engine. Locale strings are passed directly to the C lib.
category may be given as one of the LC_* values.
"""
if locale and not isinstance(locale, _builtin_str):
# convert to string
locale = normalize(_build_localename(locale))
try:
return _setlocale(category, locale)
except:
passhttps://askubuntu.com/questions/1368093
复制相似问题