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

protoc-gen-go-grpc: program not found or is not executable when using APIv2 #1053

Closed
AyushG3112 opened this issue Mar 7, 2020 · 6 comments
Closed

Comments

@AyushG3112
Copy link

AyushG3112 commented Mar 7, 2020

go version: go version go1.14 linux/amd64

go.mod

module [redacted]

go 1.14

require (
	github.com/golang/protobuf v1.4.0-rc.2
	google.golang.org/grpc v1.27.1
	google.golang.org/protobuf v1.20.0 // indirect
)

I installed protoc-gen-go via:

go get google.golang.org/protobuf/cmd/protoc-gen-go

I am running the following command:

protoc -I ./src/pbdefs/protos/ --go-grpc_out=. src/pbdefs/protos/*.proto

to generate my GRPC output files from .proto files, with I am getting an error

protoc-gen-go-grpc: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1.
@AyushG3112
Copy link
Author

OK, just found out, as per https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.20.0

The v1.20 protoc-gen-go does not support generating gRPC service definitions. In the future, gRPC service generation will be supported by a new protoc-gen-go-grpc plugin provided by the Go gRPC project.

The github.com/golang/protobuf version of protoc-gen-go continues to support gRPC and will continue to do so for the foreseeable future.

@HakShak
Copy link

HakShak commented Apr 15, 2020

For those we find this, watch here for the gRPC support: grpc/grpc-go#3453

@dsa0x
Copy link

dsa0x commented Aug 23, 2020

OK, just found out, as per https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.20.0

The v1.20 protoc-gen-go does not support generating gRPC service definitions. In the future, gRPC service generation will be supported by a new protoc-gen-go-grpc plugin provided by the Go gRPC project.
The github.com/golang/protobuf version of protoc-gen-go continues to support gRPC and will continue to do so for the foreseeable future.

You found out. How did you solve it please???

@dbyington
Copy link

If you stumbled upon this issue, you're probably want to do this:

go get google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc

@ghost
Copy link

ghost commented Jan 16, 2021

@dbyington thank you

@LordMoMA
Copy link

I used the official:

protoc --go_out=. --go_opt=paths=source_relative
--go-grpc_out=. --go-grpc_opt=paths=source_relative
routeguide/route_guide.proto

it worked in the official file, not workable in mine after I changed the "routeguide/route_guide.proto" into my own file name

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

5 participants