繁体   English   中英

在 Go 语言中找不到提供 package ed25519 的模块

[英]Cannot find module providing package ed25519 in Go language

我是 Go 语言的新手。 I want to test some code in Go language some code in Go language by using this command 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

我错过了什么?

自 2020 年 8 月以来,目前在perlin-network/noise issue 287中提到了这一点,目前(2021 年第二季度)没有任何答案。

另一种方法是:

  • fork 存储库perlin-network/noise
  • 更新 fork me/noise中的依赖关系
  • 在您的项目中使用go mod replace来切换存储库。

但是所有这些都表明您自己的项目使用 go mod ,因此请确保首先go init myproject ,以便从这些依赖项管理功能中受益。
这样,不需要$GOPATH/src

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM