我是围棋语言新手。我想使用这个命令Go语言中的一些代码在Go语言go run main.go中测试一些代码。
我有一个错误: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我错过了什么吗?
发布于 2021-06-01 07:38:03
从2020年8月开始,第287期中就提到了这一点,目前还没有任何答案(Q2 2021)。
另一种选择是:
perlin-network/noiseme/noise中的依赖项go mod replace来切换存储库。但是,所有这些都表明了您自己的项目使用go mod,所以确保首先使用go init myproject,以便从这些依赖关系管理特性中获益。
这样,就不需要$GOPATH/src了。
https://stackoverflow.com/questions/67779441
复制相似问题