加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

dep - Solving failure: No versions/No more versions of xxx

发布时间:2020-12-16 19:09:04 所属栏目:大数据 来源:网络整理
导读:前言 如果你正在使用 Golang 的dep工具,我相信你可能会遇到这个问题 dep 版本 $ dep versiondep: version : devel build date : git hash : go version : go1.10 go compiler : gc platform : linux/amd64 当前 Latest release 为 v0.4.1 问题 使用 dep 包

前言

如果你正在使用Golang的dep工具,我相信你可能会遇到这个问题

dep 版本

$ dep version
dep:
 version     : devel
 build date  : 
 git hash    : 
 go version  : go1.10
 go compiler : gc
 platform    : linux/amd64

当前Latest releasev0.4.1

问题

使用dep包管理工具时,无论执行dep init -v或是dep ensure

总是报版本错误(no more versionsno versions)的问题

$ dep ensure
Solving failure: No versions of xxxx met constraints:
    master: unable to update checked out version: fatal: reference is not a tree: 2c5e7ac708aaa719366570dd82bda44541ca2a63
: command failed: [git checkout 2c5e7ac708aaa719366570dd82bda44541ca2a63]: exit status 128

原因

算是一个bug,是由于缓存的错误没有得到正确的更新

解决方案

rm -rf $GOPATH/pkg/dep/sources

然后再重新执行dep ensure或是dep init -v就可以了


你又遇到过什么奇奇怪怪的问题呢,交流一下 :=)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读