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

  golang

Preface

If you are usingGolangThedepTools, I believe you may encounter this problem

Dep version

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

CurrentLatest releaseForv0.4.1

Problem

UsedepPackage management tools, regardless of executiondep init -vOrdep ensure

Always report version errors (no more versionsno versions) problem

$ 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

Reason

Is onebugBecause cache errors were not updated correctly

Solution


rm -rf $GOPATH/pkg/dep/sources

And then execute it againdep ensureOrdep init -vJust do it


What strange and strange problems have you encountered? Let’s exchange: =)