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’
我做了什么
ping sources.buildroot.net
给出 ping: unknown host sources.buildroot.net
甚至 ping google.com
给出 ping: unknown host google.com
注意:可以使用浏览器打开链接。
我将 HTTPS_PROXY
和 HTTP_PROXY
环境变量更改为等于在浏览器上设置的值,问题仍然存在。
我按照指示编辑了 /etc/resolv.conf
here 但问题仍然存在
你能帮我解决这个问题吗
您的环境变量需要小写。使用 http_proxy
和 https_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.
我在使用以下命令时遇到错误:
> 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_PROXY
和HTTP_PROXY
环境变量更改为等于在浏览器上设置的值,问题仍然存在。我按照指示编辑了
/etc/resolv.conf
here 但问题仍然存在
你能帮我解决这个问题吗
您的环境变量需要小写。使用 http_proxy
和 https_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.