duanbei1903 2018-05-03 03:54
浏览 127

Go Dep无法解析“ golang.org/x/crypto”

I'm not very familiar with go dep (nor golang in general) but I inherited a project in which I need to add a dependency. When running dep ensure -v I get the following output:

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

I am suspecting the problem is in the line:

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

but does that indicate a dependency problem in the github.com/golang/protobuf package?

Can someone explain what the actual problem is and what are possible solutions?

  • 写回答

1条回答 默认 最新

  • doushi3803 2018-05-03 04:43
    关注

    golang.org/x/crypto has multiple packages inside. So you should be having the right package in dependency specified (for example, golang.org/x/crypto/ssh) or the entire package tree by golang.org/x/crypto/...

    评论

报告相同问题?

悬赏问题

  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。
  • ¥20 CST怎么把天线放在座椅环境中并仿真
  • ¥15 任务A:大数据平台搭建(容器环境)怎么做呢?
  • ¥15 YOLOv8obb获取边框坐标时报错AttributeError: 'NoneType' object has no attribute 'xywhr'