I'm trying to install Levant but I'm getting the error:
go install github.com/hashicorp/levant
build github.com/hashicorp/levant: cannot load github.com/hashicorp/consul/api: ambiguous import: found github.com/hashicorp/consul/api in multiple modules:
github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089 (/root/go/pkg/mod/github.com/hashicorp/[email protected]/api)
github.com/hashicorp/consul/api v1.15.2 (/root/go/pkg/mod/github.com/hashicorp/consul/[email protected])
I tried installing one version module separately:
go get github.com/hashicorp/consul/[email protected]
Also:
go mod download /root/go/pkg/mod/github.com/hashicorp/[email protected]/api
/root/go/pkg/mod/github.com/hashicorp/[email protected]/api: malformed module path "/root/go/pkg/mod/github.com/hashicorp/consul": empty path element
What do I need to install Levant without errors?
upd: I was able to install Levant by downloading the binaries, but I couldn't fix the error with go get/install: download binaries https://releases.hashicorp.com/levant/ and run unzip
Try
See Compile and install packages and dependencies:
BTW, the error message indicates that your main module (the current directory or any parent directory that contains a
go.mod
file) depends on a very old modulegithub.com/hashicorp/[email protected]
. Ago.mod
file is added to https://github.com/hashicorp/consul in 2019 (see this commit). You should upgrade this dependency for the main module. But if your purpose is to install thelevant
tool, you can ignore this issue now.