当我尝试安装 Burrow https://github.com/linkedin/Burrow#build-and-install时
go get github.com/linkedin/Burrow
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
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)
Run Code Online (Sandbox Code Playgroud)
我已经通过以下方式设置了代理:
export http_proxy=myproxy:port
export https_proxy=myproxy:port
Run Code Online (Sandbox Code Playgroud)
编辑:
go get -u gopkg.in/gcfg.v1
Run Code Online (Sandbox Code Playgroud)
也给出了同样的错误:
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)
Run Code Online (Sandbox Code Playgroud)
编辑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)
Run Code Online (Sandbox Code Playgroud)
小智 -1
我使用以下方法解决了问题:
export https_proxy=$http_proxy
Run Code Online (Sandbox Code Playgroud)
为了获得更持久的解决方案,可以更新 /etc/environment。
| 归档时间: |
|
| 查看次数: |
13999 次 |
| 最近记录: |