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

來源:互聯網
上載者:User
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。

前言

如果你正在使用Golang的dep工具,我相信你可能會遇到這個問題

dep 版本

$ dep versiondep: 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 ensureSolving 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就可以了

你又遇到過什麼奇奇怪怪的問題呢,交流一下 :=)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.