如果找不到 www.example.com,为什么 BitBake 会出错?
Why does BitBake error if it can't find www.example.com?
BitBake 对我来说失败了,因为它找不到 https://www.example.com。
我的电脑是 x86-64 运行ning 原生 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 的运营如此重要的网站是什么? 为什么 BitBake post 如果找不到 https://www.example.com 会出错?
此时,我不想设置BB_NO_NETWORK = "1"。我宁愿先了解并解决问题的根本原因。
对我来说,这似乎是我的 ISP (CenturyLink) 没有正确解析 www.example.com 的问题。如果我尝试在浏览器地址栏中导航到 https://www.example.com,我只会被带到 ISP 的 "this is not a valid address" 页面。
从技术上讲,这不应该发生,但无论出于何种原因。我可以通过将 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 检查的更多见解和讨论,请参阅 this commit。不确定最好的长期解决方案是什么,但上面的更改让我能够成功构建。
修改 poky.conf 对我不起作用(根据我的阅读,修改 Poky 下的任何内容都是 no-no 的长期解决方案)。
修改/conf/local.conf 是唯一对我有用的解决方案。只需添加以下两个选项之一:
#check connectivity using google
CONNECTIVITY_CHECK_URIS = "https://www.google.com/"
#skip connectivity checks
CONNECTIVITY_CHECK_URIS = ""
最初发现此解决方案 here。
如果您想在不修改 poky.conf
或 local.conf
或与此相关的任何文件的情况下解决此问题,只需执行以下操作:
$touch conf/sanity.conf
meta/conf/sanity.conf
里面写的很清楚:
Expert users can confirm their sanity with "touch conf/sanity.conf"
如果您不想在每个会话或构建中都执行此命令,您可以注释掉 meta/conf/sanity.conf
中的 INHERIT += "sanity"
行,因此文件看起来像这样:
在访问 example.com
时出现与 Bell ISP 相同的问题并给出 DNS 错误。
通过将 ISP 的 DNS IP 切换到 Google 的 DNS 来解决(以避免更改配置):
https://developers.google.com/speed/public-dns/docs/using
BitBake 对我来说失败了,因为它找不到 https://www.example.com。
我的电脑是 x86-64 运行ning 原生 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 的运营如此重要的网站是什么? 为什么 BitBake post 如果找不到 https://www.example.com 会出错?
此时,我不想设置BB_NO_NETWORK = "1"。我宁愿先了解并解决问题的根本原因。
对我来说,这似乎是我的 ISP (CenturyLink) 没有正确解析 www.example.com 的问题。如果我尝试在浏览器地址栏中导航到 https://www.example.com,我只会被带到 ISP 的 "this is not a valid address" 页面。
从技术上讲,这不应该发生,但无论出于何种原因。我可以通过将 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 检查的更多见解和讨论,请参阅 this commit。不确定最好的长期解决方案是什么,但上面的更改让我能够成功构建。
修改 poky.conf 对我不起作用(根据我的阅读,修改 Poky 下的任何内容都是 no-no 的长期解决方案)。
修改/conf/local.conf 是唯一对我有用的解决方案。只需添加以下两个选项之一:
#check connectivity using google
CONNECTIVITY_CHECK_URIS = "https://www.google.com/"
#skip connectivity checks
CONNECTIVITY_CHECK_URIS = ""
最初发现此解决方案 here。
如果您想在不修改 poky.conf
或 local.conf
或与此相关的任何文件的情况下解决此问题,只需执行以下操作:
$touch conf/sanity.conf
meta/conf/sanity.conf
里面写的很清楚:
Expert users can confirm their sanity with "touch conf/sanity.conf"
如果您不想在每个会话或构建中都执行此命令,您可以注释掉 meta/conf/sanity.conf
中的 INHERIT += "sanity"
行,因此文件看起来像这样:
在访问 example.com
时出现与 Bell ISP 相同的问题并给出 DNS 错误。
通过将 ISP 的 DNS IP 切换到 Google 的 DNS 来解决(以避免更改配置):
https://developers.google.com/speed/public-dns/docs/using