gpt4 book ai didi

Go dep 不解析 "golang.org/x/crypto"

转载 作者:数据小太阳 更新时间:2023-10-29 03:11:40 24 4
gpt4 key购买 nike

我不是很熟悉 go dep(一般也不熟悉 golang),但我继承了一个项目,我需要在其中添加依赖项。运行 dep ensure -v 时,我得到以下输出:

Root project is "github.com/MyOrg/myProject"
7 transitively valid internal packages
8 external packages imported from 8 projects
(0) ✓ select (root)
(1) ? attempt github.com/MyOrg/proto with 1 pkgs; at least 1 versions to try
(1) try github.com/MyOrg/proto@v0.5.0
(1) ✓ select github.com/MyOrg/proto@v0.5.0 w/1 pkgs
(2) ? attempt github.com/golang/protobuf with 1 pkgs; at least 1 versions to try
(2) try github.com/golang/protobuf@v1.0.0
(2) ✓ select github.com/golang/protobuf@v1.0.0 w/5 pkgs
(3) ? attempt github.com/gogap/logrus_mate with 1 pkgs; at least 1 versions to try
(3) try github.com/gogap/logrus_mate@master
(3) ✓ select github.com/gogap/logrus_mate@master w/1 pkgs
(4) ? attempt github.com/sirupsen/logrus with 1 pkgs; at least 1 versions to try
(4) try github.com/sirupsen/logrus@f4ee69125072b22721efbe639bd0da9c9d19b8cc
(4) ✓ select github.com/sirupsen/logrus@f4ee69125072b22721efbe639bd0da9c9d19b8cc w/1 pkgs
(5) ? revisit github.com/golang/protobuf to add 6 pkgs
(5) ✓ include 6 more pkgs from github.com/golang/protobuf@v1.0.0
(6) ← no more versions of golang.org/x/crypto to try; begin backtrack
(5) ← backtrack: popped 6 pkgs from github.com/golang/protobuf
(4) ← backtrack: no more versions of github.com/sirupsen/logrus to try
(3) ← backtrack: no more versions of github.com/gogap/logrus_mate to try
(2) ← backtrack: no more versions of github.com/golang/protobuf to try
(1) ← backtrack: no more versions of github.com/MyOrg/proto to try
✗ solving failed

Solver wall times by segment:
b-source-exists: 9.026066635s
b-deduce-proj-root: 542.618581ms
b-list-pkgs: 145.641921ms
b-gmal: 100.702298ms
satisfy: 1.205187ms
select-atom: 1.159204ms
unselect: 1.110058ms
new-atom: 179.985µs
select-root: 139.444µs
backtrack: 43.169µs
other: 30.441µs
add-atom: 5.475µs

TOTAL: 9.818902398s

Solving failure: exit status 128

我怀疑问题出在线路上:

(6)   ← no more versions of golang.org/x/crypto to try; begin backtrack

但这是否表明 github.com/golang/protobuf 包中存在依赖性问题?

谁能解释一下实际问题是什么以及可能的解决方案是什么?

最佳答案

golang.org/x/crypto 里面有多个包。因此,您应该指定依赖项中的正确包(例如,golang.org/x/crypto/ssh)或 golang.org/x/crypto/... 的整个包树

关于Go dep 不解析 "golang.org/x/crypto",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50146694/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com