You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04.2 LTS下如何禁用Bitbake的sanity checker?

问题

系统环境为Ubuntu 22.04.2 LTS,通过Jenkins任务执行bitbake <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:
Your Python 3 is not a full install. Please install the module distutils.sysconfig (see the Getting Started guide for further information).

尝试安装distutils模块但遇到无法解决的依赖问题,因此希望通过修改sanity.conf禁用sanity checker。当前sanity.conf内容如下:

# Sanity checks for common user misconfigurations
#
# See sanity.bbclass
#
# Expert users can confirm their sanity with "touch conf/sanity.conf"
BB_MIN_VERSION = "1.46.0"

SANITY_ABIFILE = "${TMPDIR}/abi_version"

SANITY_VERSION ?= "1"
LOCALCONF_VERSION  ?= "1"
LAYER_CONF_VERSION ?= "7"
SITE_CONF_VERSION  ?= "1"

INHERIT += "sanity"
解决方法

要禁用sanity checker,只需修改sanity.conf中的继承配置:

  • 打开sanity.conf文件
  • 找到最后一行INHERIT += "sanity"
  • 将其替换为:
    INHERIT -= "sanity"
    

也可以直接删除INHERIT += "sanity"这一行,效果相同。但使用-=的方式更直观,明确表示移除sanity检查的继承。

⚠️ 注意:官方提示禁用sanity checker需自行承担风险,这些检查是为了提前排查环境配置问题,避免后续出现更复杂的构建故障。

内容的提问来源于stack exchange,提问作者JaSON

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.08 09:27:39