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

go install version conflict #216

Open
Clumsy-Coder opened this issue Apr 28, 2022 · 3 comments
Open

go install version conflict #216

Clumsy-Coder opened this issue Apr 28, 2022 · 3 comments

Comments

@Clumsy-Coder
Copy link

gotop version:

n/a

OS/Arch:

pop_os 22.04
5.16.19-76051619-generic GNU/Linux

Terminal emulator:

Gnome terminal

Any relevant hardware info:

Running on VirtualBox

tmux version:

n/a


Trying to install gotop using go install command returns the following error

command:

go install github.com/xxxserxxx/gotop/v4/cmd/gotop@latest

output

go: downloading github.com/xxxserxxx/gotop v1.0.1
go: downloading github.com/xxxserxxx/gotop/v4 v4.1.3
go: github.com/xxxserxxx/gotop/v4/cmd/gotop@latest (in github.com/xxxserxxx/gotop/[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.

Golang version:

go version go1.18.1 linux/amd64

ENV exports

export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
@alarbada
Copy link

alarbada commented May 7, 2022

This one did work:

go install github.com/xxxserxxx/gotop/v4/cmd/[email protected]

So apparently something shady happened between v4.1.2 and v4.1.3...

@Gelio
Copy link

Gelio commented May 29, 2022

I have been also hitting this problem for some time. The problem seems to be that there was a replace directive in go.mod for goopt in version 4.1.3:

70d96bd#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6

It was removed in db95c9c but a newer version has not been released yet, so the latest version (4.1.3) has the replace directive, which prevents installing it with go install.

The problem should go away once a newer version is released, as go.mod does not have any more replace directives.

@Gelio
Copy link

Gelio commented Jul 26, 2022

This should be solved with the release of version 4.1.4. I was able to upgrade to 4.1.4 with go install without a problem.

I believe this issue could be closed as solved

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

3 participants