如果 BitBake 找不到 www.example.com,为什么会出现错误?

12

BitBake失败了,因为它找不到https://www.example.com

我的电脑是x86-64,运行本地Xubuntu 18.04。网络连接通过DSL。我正在使用最新版本的OpenEmbedded/Yocto工具链。

当我运行BitBake时,我得到以下响应:

$ bitbake -k core-image-sato
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
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:

Fetcher failure for URL: 'https://www.example.com/'. URL https://www.example.com/ doesn't work.
Please ensure your host's network is configured correctly,
or set BB_NO_NETWORK = "1" to disable network access if
all required sources are on local disk.


Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

网络问题,我无法访问www.example.com,这是一个SuperUser论坛的问题。我在这里的问题是,为什么BitBake依赖于www.example.com的存在?那个网站对BitBake的操作非常重要吗?如果找不到https://www.example.com,为什么BitBake会发布错误信息?
目前,我不希望设置BB_NO_NETWORK =“1”。我宁愿先了解并解决问题的根本原因。

这表示存在连接问题,可能是代理、DNS等任何原因。 - Oleksandr Kravchuk
澄清一下:为什么BitBake依赖于www.example.com?我会编辑问题。 - Ray Depew
4
它并不会使用互联网连接,它只是用来检查主机是否已连接到互联网。 - Oleksandr Kravchuk
5个回答

18

修改poky.conf对我没有用(根据我所读的,修改Poky下的任何内容都不是长期解决方案)。

只有修改/conf/local.conf才是对我有效的解决方案。只需要添加以下两个选项之一:

#check connectivity using google
CONNECTIVITY_CHECK_URIS = "https://www.google.com/"

#skip connectivity checks
CONNECTIVITY_CHECK_URIS = ""

这个解决方案最初是在这里找到的。


3
这个应该被接受的答案;修改local.conf要比poky.conf更受欢迎,后者很难维护,特别是如果你在团队中工作。 - Carsten Hansen

11
对我而言,这似乎是我的ISP(CenturyLink)未正确解析www.example.com的问题。如果我尝试在浏览器地址栏中导航到https://www.example.com,我只会被带到ISP的“这不是有效地址”的页面。
严格地说,这本不应该发生,但出于某种原因它确实发生了。我暂时通过修改poky/meta-poky/conf/distro/poky.conf中的CONNECTIVITY_CHECK_URIS来解决这个问题。
# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
# fetch from the network (and warn you if not). To disable the test set
# the variable to be empty.
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master    
CONNECTIVITY_CHECK_URIS ?= "https://www.google.com/"

查看此次提交,了解有关添加www.example.com检查的更多见解和讨论。 不确定最佳的长期修复方法是什么,但上述更改使我成功构建。


我和同一个网络服务提供商有同样的问题,这个方法解决了它。 - user8908459
我在法国,我的ISP是Orange,我无法访问或ping https://www.example.com/。这个方法解决了我的问题,谢谢 :) - deb0ch

1
如果您想在不修改poky.conflocal.conf或任何其他文件的情况下解决此问题,只需执行以下操作:
$touch conf/sanity.conf

meta/conf/sanity.conf 文件中,明确写道:

专业用户可以使用 "touch conf/sanity.conf" 命令来确认其完整性。

如果你不想在每个会话或构建中执行此命令,可以将 meta/conf/sanity.conf 中的 INHERIT += "sanity" 行注释掉,使文件看起来像这样:

meta/conf/sanity.conf


1

0
避免测试的最简单方法是按照poky.conf中的建议去做。
...
# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
# fetch from the network (and warn you if not). To disable the test set
# the variable to be empty.
...

在由您的层控制的.conf文件中(建议使用site.conf),或者当然也可以在local.conf中,添加以下内容: CONNECTIVITY_CHECK_URIS = ""

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接