wget:无法解析主机地址

穆因

我收到以下命令错误:

> wget sources.buildroot.net
--2017-01-04 09:22:20--  http://sources.buildroot.net/
Resolving sources.buildroot.net (sources.buildroot.net)... failed: Name or service not known.
wget: unable to resolve host address ‘sources.buildroot.net’

我做了什么

  • ping sources.buildroot.net给人ping: unknown host sources.buildroot.net甚至ping google.com给人ping: unknown host google.com
    注意:这些链接可以使用浏览器打开。

  • 我改变HTTPS_PROXYHTTP_PROXYenvironement变量等于在浏览器中设定的值,问题仍然存在。

  • /etc/resolv.conf按照此处指示进行编辑但问题仍然存在

您能帮我解决这个问题吗?

塞尔比

您的环境变量必须为小写。使用http_proxyhttps_proxy代替HTTP_PROXY

man wget 有所有的细节。

Wget支持HTTP和FTP检索的代理。Wget可以识别的指定代理位置的标准方法是使用以下环境变量:

http_proxy

https_proxy

如果设置,则http_proxy和https_proxy变量应分别包含HTTP和HTTPS连接的代理的URL。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章