Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot "go install" due to replace directives #407

Open
hmeine opened this issue Apr 14, 2021 · 3 comments
Open

Cannot "go install" due to replace directives #407

hmeine opened this issue Apr 14, 2021 · 3 comments

Comments

@hmeine
Copy link

hmeine commented Apr 14, 2021

I have just installed go 1.16.3 via MacPorts, which may not be the version the installation instructions were intended for:

# go install github.com/hashicorp/levant
go install: version is required when current directory is not in a module
	Try 'go install github.com/hashicorp/levant@latest' to install the latest version

With @latest or @v0.3.0 I get the following:

# go install github.com/hashicorp/[email protected]
go install github.com/hashicorp/[email protected]: github.com/hashicorp/[email protected]
	The go.mod file for the module providing named packages contains one or
	more replace directives. It must not contain directives that would cause
	it to be interpreted differently than if it were the main module.

Unfortunately, I do not know how to work around this problem.

(I removed the other sections of the issue template, because they were all not applicable.)

@animeshjain
Copy link

animeshjain commented May 8, 2021

Hello, I'm also facing the same issue on go version go1.16.4 darwin/amd64. I've never used go modules before so not quite sure what to do about it.

@GauravRaii
Copy link

I have the exact issue.

@schematis
Copy link

schematis commented Aug 4, 2021

Experiencing this issue installing into the golang:alpine docker container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants