【发布时间】:2017-02-17 10:14:39
【问题描述】:
当我尝试安装 Burrow https://github.com/linkedin/Burrow#build-and-install
go get github.com/linkedin/Burrow
我收到以下错误:
package gopkg.in/gcfg.v1: unrecognized import path "gopkg.in/gcfg.v1"
(https fetch: Get https://gopkg.in/gcfg.v1?go-get=1: proxyconnect tcp: dial tcp :0: getsockopt: connection refused)
我已经通过以下方式设置了代理:
export http_proxy=myproxy:port
export https_proxy=myproxy:port
编辑:
go get -u gopkg.in/gcfg.v1
同样报错:
package gopkg.in/gcfg.v1: unrecognized import path "gopkg.in/gcfg.v1"
(https fetch: Get https://gopkg.in/gcfg.v1?go-get=1: proxyconnect tcp: dial tcp :0: getsockopt: connection refused)
编辑1:
go get -v gopkg.in/gcfg.v1
Fetching https://gopkg.in/gcfg.v1?go-get=1
https fetch failed: Get https://gopkg.in/gcfg.v1?go-get=1: proxyconnect tcp: dial tcp :0: getsockopt: connection refused
package gopkg.in/gcfg.v1: unrecognized import path "gopkg.in/gcfg.v1" (https fetch: Get https://gopkg.in/gcfg.v1?go-get=1: proxyconnect tcp: dial tcp :0: getsockopt: connection refused)
【问题讨论】:
-
错误消息中的
:0位看起来很奇怪。我们是否有机会看到您的真实 HTTP 代理规范(主机名替换为example.com或IP 地址的数字替换为随机值)? -
我的代理是
export http_proxy=http.proxy.example.com:8080。我可以做一个wget https://gopkg.in/gcfg.v1并获得一个html。 -
您可以尝试运行
go get -v gopkg.in/gcfg.v1(注意-v标志)并更新您的问题吗? -
@kostix 更新
-
在设置
export http_proxy=proxy.domain.local:8080; export https_proxy=$http_proxy并运行go get -v -u gopkg.in/gcfg.v1之后,我得到:http: error connecting to proxy http://proxy.domain.local:8080: dial tcp 192.168.2.20:8080: getsockopt: connection refused gopkg.in/gcfg.v1 (download) ...——正如你所看到的,它提到了代理的名称和正确的端口(我们的代理最近已被删除,所以“无法连接”是预期的)。我有go1.7.4 linux/amd64。我想知道还有什么会影响您所观察到的。
标签: go http-proxy