yq: cannot find package "github.com/mikefarah/yaml/v2"

$ GO111MODULE=on go get -v github.com/mikefarah/yq 
github.com/mikefarah/yaml (download)
package github.com/mikefarah/yaml/v2: cannot find package "github.com/mikefarah/yaml/v2" in any of:
	/usr/lib/go-1.10/src/github.com/mikefarah/yaml/v2 (from $GOROOT)
	/home/rotary/go/src/github.com/mikefarah/yaml/v2 (from $GOPATH)

$ GO11MODULE=on go get -v github.com/mikefarah/yaml/v2
github.com/mikefarah/yaml (download)
package github.com/mikefarah/yaml/v2: cannot find package "github.com/mikefarah/yaml/v2" in any of:
	/usr/lib/go-1.10/src/github.com/mikefarah/yaml/v2 (from $GOROOT)
	/home/rotary/go/src/github.com/mikefarah/yaml/v2 (from $GOPATH)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (5 by maintainers)

Most upvoted comments

I started a blank VM and I can only get ‘go get’ to work if I specify the version:

GO111MODULE=on go get github.com/mikefarah/yq@2.4.1

If I leave off the 2.4.1 it complains about yaml/v2

/me scratches head

I’ve updated the readme but kind of at a loss at why go get wouldn’t be downloading the latest version by default?

needed to combine Mike’s nov comment and goutamtadi, but this worked for me today.

go get github.com/mikefarah/yq/v2@2.4.1

Thanks for the comment and work!