今日不肯埋头,明日何以抬头!每日一句努力自己的话哈哈~哈喽,今天我将给大家带来一篇《dep Ensure运行失败:无法对清单、锁和供应商进行写入排序:无法验证存在VerifyVendor声称的文件》,主要内容是讲解等等,感兴趣的朋友可以收藏或者有更好的建议在评论提出,我都会认真看的!大家一起进步,一起学习!
问题内容运行 dep ensure
时出现以下错误:
清单、锁和供应商的分组写入:无法统计文件 verifyvendor 声称存在:stat“供应商内包的路径”:没有这样的文件或目录
这是我的 gopkg.toml
:
[[constraint]]
name = "github.com/PuerkitoBio/goquery"
version = "1.5.0"
[[constraint]]
branch = "master"
name = "github.com/auth0-community/go-auth0"
[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.16.32"
[[constraint]]
name = "github.com/coocood/freecache"
version = "1.0.1"
[[constraint]]
branch = "master"
name = "github.com/gregjones/httpcache"
[[constraint]]
branch = "master"
name = "github.com/julienschmidt/httprouter"
[[constraint]]
branch = "master"
name = "github.com/justinas/alice"
[[constraint]]
name = "github.com/microcosm-cc/bluemonday"
version = "1.0.2"
[[constraint]]
name = "github.com/mssola/user_agent"
version = "0.4.1"
[[constraint]]
name = "github.com/rs/cors"
version = "1.6.0"
[[constraint]]
name = "github.com/sethgrid/pester"
version = "1.0.0"
[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.3.0"
[[constraint]]
name = "github.com/stretchr/testify"
version = "1.3.0"
[[constraint]]
name = "gopkg.in/dgrijalva/jwt-go.v3"
version = "3.2.0"
[[constraint]]
name = "gopkg.in/square/go-jose.v2"
version = "2.2.2"
解决方案
我通过删除供应商目录解决了这个问题。
再次运行 dep Ensure
重新创建了包含所有必需依赖项的供应商文件夹。
有时也可以通过修复文件夹权限来解决此问题,但删除文件夹似乎是解决此问题的最简单方法。
刚刚遇到了类似的问题,删除 $GOPATH /pkg/dep/sources 为我解决了这个问题。
理论要掌握,实操不能落!以上关于《dep Ensure运行失败:无法对清单、锁和供应商进行写入排序:无法验证存在VerifyVendor声称的文件》的详细介绍,大家都掌握了吧!如果想要继续提升自己的能力,那么就来关注编程网公众号吧!