首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >构建Petalinux项目时区域设置错误

构建Petalinux项目时区域设置错误
EN

Ask Ubuntu用户
提问于 2021-10-08 08:45:21
回答 1查看 602关注 0票数 0

我正在尝试构建petalinux项目,但是我遇到了这个错误。

代码语言:javascript
复制
    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

现场输出

代码语言:javascript
复制
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

有人知道怎么解决吗?

谢谢

EN

回答 1

Ask Ubuntu用户

发布于 2021-11-03 13:35:41

这个问题是由于Ubuntu18.04LTS(可能是一些更新的库)与Yocto / PetaLinux中包含的Python3.5不兼容造成的。

解决方法是编辑“./usr/lib/python3.5/locale.py”文件(S),并使setlocale()函数悄然失败:

代码语言:javascript
复制
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:
        pass

https://support.xilinx.com/s/question/0D52E00006hpjH7/petalinux-build-fails-with-locale-errors-how-to-disable-locale-checks?language=en_我们

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1368093

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档