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 go-micro.dev/v4/cmd/protoc-gen-micro@latest error #2344

Closed
tutengdihuang opened this issue Nov 10, 2021 · 6 comments · Fixed by #2462
Closed

[BUG] go install go-micro.dev/v4/cmd/protoc-gen-micro@latest error #2344

tutengdihuang opened this issue Nov 10, 2021 · 6 comments · Fixed by #2462

Comments

@tutengdihuang
Copy link

Describe the bug
go install go-micro.dev/v4/cmd/protoc-gen-micro@latest

go install: go-micro.dev/v4/cmd/protoc-gen-micro@latest: go-micro.dev/v4/cmd/protoc-gen-micro@v1.18.0: parsing go.mod:
module declares its path as: github.com/micro/go-micro
but was required as: go-micro.dev/v4/cmd/protoc-gen-micro

How to reproduce the bug:

If possible, please include a minimal code snippet here.

Environment:
Go Version: please paste go version output here

please paste `go env` output here
 go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN="/Volumes/Disk2/WorkSpace/bi"
GOCACHE="/Users/xuqianlong/Library/Caches/go-build"
GOENV="/Users/xuqianlong/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Volumes/Disk2/WorkSpace/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Volumes/Disk2/WorkSpace"
GOPRIVATE=""
GOPROXY="https://goproxy.cn"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/y1/7sv1k8350qx75y3gphq8p48m0000gn/T/go-build152268905=/tmp/go-build -gno-record-gcc-switches -fno-common"

@tutengdihuang tutengdihuang changed the title [BUG] p [BUG] go install go-micro.dev/v4/cmd/protoc-gen-micro@latest error Nov 10, 2021
@asim
Copy link
Member

asim commented Nov 10, 2021

Use @master or specify the tag.

@localrivet
Copy link

Hi @asim, I'm getting the same error both with the @latest and @master tags. Any other suggestions to get this to build?

With @master

go install go-micro.dev/cmd/protoc-gen-micro/v4@master 
go install: go-micro.dev/cmd/protoc-gen-micro/v4@master: go-micro.dev/cmd/protoc-gen-micro/v4@v4.4.0: parsing go.mod:
        module declares its path as: go-micro.dev/v4
                but was required as: go-micro.dev/cmd/protoc-gen-micro/v4

with @latest

go install go-micro.dev/cmd/protoc-gen-micro/v4@latest
go install: go-micro.dev/cmd/protoc-gen-micro/v4@latest: go-micro.dev/cmd/protoc-gen-micro/v4@v4.4.0: parsing go.mod:
        module declares its path as: go-micro.dev/v4
                but was required as: go-micro.dev/cmd/protoc-gen-micro/v4
go version go1.17.2 darwin/amd64

@asim
Copy link
Member

asim commented Nov 17, 2021

go-micro.dev/v4/cmd/protoc-gen-micro

@dacsang97
Copy link

go-micro.dev/v4/cmd/protoc-gen-micro

I'm getting this error

$ go install go-micro.dev/v4/cmd/protoc-gen-micro@latest
go install: go-micro.dev/v4/cmd/protoc-gen-micro@latest: go-micro.dev/v4/cmd/protoc-gen-micro@v1.18.0: parsing go.mod:
	module declares its path as: github.com/micro/go-micro
	        but was required as: go-micro.dev/v4/cmd/protoc-gen-micro

@dacsang97
Copy link

I use below command to fix this issue:

go install go-micro.dev/v4/cmd/protoc-gen-micro@v4

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

Successfully merging a pull request may close this issue.

5 participants
@asim @localrivet @dacsang97 @tutengdihuang and others