去安装第三部分包,无法识别的导入路径



Detail:

C:>go get -u github.com/hidu/proxy-manager
package code.google.com/p/go.net/proxy: Get http://www.google.com/hangouts/: stopped after 10 redirects
package golang.org/x/crypto/blowfish: unrecognized import path "golang.org/x/crypto/blowfish"
package golang.org/x/crypto/cast5: unrecognized import path "golang.org/x/crypto/cast5"
package golang.org/x/crypto/salsa20/salsa: unrecognized import path "golang.org/x/crypto/salsa20/salsa"

我想也许是因为谷歌在中国是被禁止的?如何解决此错误?

我在这里打开了一个问题,在存储库所有者的帮助下解决了。

我尝试安装的软件包使用的是 godepgo vendor .
go vendor需要去1.5+,最重要的是:

export GO15VENDOREXPERIMENT=1

此命令使安装成功。

也许也是因为 code.google.com/p/go.net 已被存档。

确保您使用的项目包含该 go.net 项目的最新分支,例如 github.com/hashicorp/go.net

如果您不能直接更改 github.com/hidu/proxy-manager,则需要先分叉它.
然后在hidu/proxy-manager/manager/client.go#L4中更改导入

有关"无法识别的导入路径",请参阅以下线程:

一种常见的解释是某些内容阻止了对golang.org域的访问。

go get -v golang.org/x/crypto/blowfish应该告诉你更多。

最后一部分对我有用:

C:Usersvoncprog>go get -v golang.org/x/crypto/blowfish
Fetching https://golang.org/x/crypto/blowfish?go-get=1
Parsing meta tags from https://golang.org/x/crypto/blowfish?go-get=1 (status code 200)
get "golang.org/x/crypto/blowfish": found meta tag 
    main.metaImport{Prefix:"golang.org/x/crypto", 
                    VCS:"git", 
                    RepoRoot:"https://go.googlesource.com/crypto"} 
at https://golang.org/x/crypto/blowfish?go-get=1
get "golang.org/x/crypto/blowfish": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
golang.org/x/crypto/blowfish

正在尝试代理

export GO111MODULE=on
export GOPROXY=https://goproxy.cn

最新更新