Did you get the above error when you ran “dep ensure” or any similar command when using go language dependency tool- “dep”? ( https://github.com/golang/dep/). If yes, just look at the version of “dep” in your system.
[root@localhost ]# dep version
dep:
version : v0.3.1
build date : 2017-09-19
git hash : 83789e2
go version : go1.9
go compiler : gc
platform : linux/amd64
[root@localhost ]#
Do you feel this is an old version of “dep”, yes, its old? Let’s upgrade “dep” version in your system and give a try:
To upgrade:
root@localhost ]# curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5110 100 5110 0 0 4397 0 0:00:01 0:00:01 –:–:– 4397
ARCH = amd64
OS = linux
Will install into /home/myhome/gopath/bin
Fetching https://github.com/golang/dep/releases/latest..
Release Tag = v0.5.0
Fetching https://github.com/golang/dep/releases/tag/v0.5.0..
Fetching https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64..
Setting executable permissions.
Moving executable to /home/myhome/gopath/bin/dep
Now you run “dep” version to make sure you are using newly installed one:
[root@localhost ]# dep version
dep:
version : v0.5.0
build date : 2018-07-26
git hash : 224a564
go version : go1.10.3
go compiler : gc
platform : linux/amd64
features : ImportDuringSolve=false
[root@localhost ]#
Try running your failed “dep” command, Are you getting that error now? I hope you are not !!
If still unlucky, let me know via comment.