got error when run the following cmd:
"protoc -I/usr/local/include -I. -I$GOPATH/src -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --grpc-gateway_out=logtostderr=true:. ./helloworld.proto"
ERROR INFO:
"protoc-gen-grpc-gateway: program not found or is not executable
--grpc-gateway_out: protoc-gen-grpc-gateway: Plugin failed with status code 1."
Can you confirm that protoc-gen-grpc-gateway is in a folder that is on your path?
What is the output of which protoc-gen-grpc-gateway?
protoc -I/usr/local/include -I. -I$GOPATH/src -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --plugin=protoc-gen-grpc-gateway=$GOPATH/bin/protoc-gen-grpc-gateway --grpc-gateway_out=logtostderr=true:. ./helloworld.proto
This presumes that your gopath is configured correctly. If not, make --plugin=protoc-gen-grpc-gateway= point to your actual protoc-grpc-gateway binary.
Thank you, I tried your cmd, it worked.
@achew22 , I tried your cmd, no error. but the xxx.pb.go file still not generated.
protoc-gen-grpc-gateway creates the grpc-gateway files, xxx.pb.go files are created by protoc-gen-go. Hope that helps!
Most helpful comment
Can you confirm that
protoc-gen-grpc-gatewayis in a folder that is on your path?What is the output of
which protoc-gen-grpc-gateway?This presumes that your gopath is configured correctly. If not, make --plugin=protoc-gen-grpc-gateway= point to your actual protoc-grpc-gateway binary.