wget:无法解析主机地址

wget: unable to resolve host address

我在使用以下命令时遇到错误:

> 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’

我做了什么

你能帮我解决这个问题吗

您的环境变量需要小写。使用 http_proxyhttps_proxy 而不是 HTTP_PROXY.

man wget 包含所有详细信息。

Wget supports proxies for both HTTP and FTP retrievals. The standard way to specify proxy location, which Wget recognizes, is using the following environment variables:

http_proxy

https_proxy

If set, the http_proxy and https_proxy variables should contain the URLs of the proxies for HTTP and HTTPS connections respectively.