【发布时间】:2021-05-31 19:41:45
【问题描述】:
我是 Go 语言的新手。我想使用这个命令go run main.go来测试Go语言some code in Go language的一些代码。
我有这个错误:
cannot find module providing package github.com/perlin-network/noise/crypto/ed25519
我尝试使用以下方式安装它:
go get github.com/perlin-network/noise/crypto/ed25519
我收到此错误:
go: finding github.com/perlin-network/noise/crypto/ed25519 latest
go: finding github.com/perlin-network/noise/crypto latest
go get github.com/perlin-network/noise/crypto/ed25519: no matching versions for query "latest"
我也试过这个:
go get -u github.com/perlin-network/noise
错误:
go: finding github.com/oasislabs/ed25519 latest
go: finding golang.org/x/lint latest
go: finding golang.org/x/xerrors latest
go: finding golang.org/x/crypto latest
go: github.com/oasislabs/ed25519@v0.0.0-20210505154701-76d8c688d86e: parsing go.mod: unexpected module path "github.com/oasisprotocol/ed25519"
go: finding golang.org/x/net latest
go get: error loading module requirements
我错过了什么吗?
【问题讨论】:
-
github.com/perlin-network/noise 使用旧的导入路径(oasislabs 已重命名为 oasisprotocol)。如果删除 -u 标志不起作用,您必须要求 perlin-network/noise 维护者更新导入。
-
可能你的工作目录不对,必须在$GOPATH/src