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

[Bug]: go install failed #2463

Closed
3 tasks done
sixg0000d opened this issue Sep 6, 2021 · 4 comments
Closed
3 tasks done

[Bug]: go install failed #2463

sixg0000d opened this issue Sep 6, 2021 · 4 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@sixg0000d
Copy link
Contributor

sixg0000d commented Sep 6, 2021

What happened?

I want to install goreleaser by go install and I did running go install github.com/goreleaser/goreleaser@latest as from document, but it is interrupted and return info:

go/pkg/mod/github.com/goreleaser/goreleaser@v0.177.0/internal/pipe/reddit/reddit.go:11:2: reading github.com/vartanbeno/go-reddit/go.mod at revision v2.0.1: unknown revision v2.0.1

It seems vartanbeno/go-reddit revoked v2.0.1 from tags

How can we reproduce this?

go install github.com/goreleaser/goreleaser@latest

goreleaser version

It's not installed yet.

GoReleaser Check

  • goreleaser check shows no errors

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

EDIT: For people who have the same problem recently, since goreleaser fixed but hasn't release the new tag yet, the go install command will still download 0.177.0 and we need a workaround, using the command below instead:

GOPROXY=goproxy.io go install github.com/goreleaser/goreleaser@latest

or install the latest fixed commit of goreleaser:

go install github.com/goreleaser/goreleaser@077d3491477182af5086aa8e9bf733d5c71da5c8
@sixg0000d sixg0000d added the bug Something isn't working label Sep 6, 2021
@caarlos0 caarlos0 added this to To do in Board Sep 6, 2021
@developer-guy
Copy link
Member

hello @sixg0000d, thanks for opening an issue but I couldn't reproduce the same issue, everything is working fine for me. I did the following steps to reproduce the issue:

$ go clean --modcache

$ sudo rm -rf $GOPATH/pkg/mod/github.com/vartanbeno/

$ go install github.com/goreleaser/goreleaser@latest

$ goreleaser -version
goreleaser version dev
module version: v0.177.0, checksum: h1:pPjL2NGfrLY5mqEK+3Nk6IgZtPyU9zB9mFxKeF3MU8w=
https://goreleaser.com

$ go list -m -versions github.com/vartanbeno/go-reddit/v2
github.com/vartanbeno/go-reddit/v2 v2.0.0 v2.0.1

Screen Shot 2021-09-06 at 19 29 50

PTAL @caarlos0 @Dentrax @erkanzileli

@Dentrax
Copy link
Member

Dentrax commented Sep 6, 2021

FROM golang:1.17.0-alpine
RUN go install github.com/goreleaser/goreleaser@latest

This works too. But this not:

$ cd /path/to/goreleaser
$ go mod graph
go: github.com/vartanbeno/go-reddit/v2@v2.0.1: reading github.com/vartanbeno/go-reddit/go.mod at revision v2.0.1: unknown revision v2.0.1

@sixg0000d
Copy link
Contributor Author

hello @sixg0000d, thanks for opening an issue but I couldn't reproduce the same issue, everything is working fine for me. I did the following steps to reproduce the issue:

$ go clean --modcache

$ sudo rm -rf $GOPATH/pkg/mod/github.com/vartanbeno/

$ go install github.com/goreleaser/goreleaser@latest

$ goreleaser -version
goreleaser version dev
module version: v0.177.0, checksum: h1:pPjL2NGfrLY5mqEK+3Nk6IgZtPyU9zB9mFxKeF3MU8w=
https://goreleaser.com

$ go list -m -versions github.com/vartanbeno/go-reddit/v2
github.com/vartanbeno/go-reddit/v2 v2.0.0 v2.0.1

Screen Shot 2021-09-06 at 19 29 50

PTAL @caarlos0 @Dentrax @erkanzileli

Sorry for lost infomation that I am using Fedora, which mean's go env GOPROXY=direct by default.
I guess you maybe using a goproxy service that it cached github.com/vartanbeno/go-reddit/v2-v2.0.1, thus you cannot reproduce this error.

The point is there is not tag v2.0.1 in vartanbeno/go-reddit the github repository anymore, I guess it will be a common error when goproxy server flush its caches.

Board automation moved this from To do to Done Sep 6, 2021
@caarlos0
Copy link
Member

caarlos0 commented Sep 6, 2021

oh, thanks for pointing that out, fixed on master.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
No open projects
Board
Done
Development

No branches or pull requests

4 participants