Today's Question:  What does your personal desk look like?        GIVE A SHOUT

Fix --go_out: protoc-gen-go: plugins are not supported

  sonic0002        2021-07-09 03:41:11       15,731        0    

When generating RPC code using proto file template in GoLang, one may face the issue like below when running the command protoc.

Error: exit status 1
Output: --go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC
See https://grpc.io/docs/languages/go/quickstart/#regenerate-grpc-code for more information.

Normally this issue is caused because the version of protoc-gen-go being used is not correct. One way to fix the issue is to follow the instructions provided by Google to run a new command.

Another way to fix this is by having the Github version of protoc-gen-go which does support the plugin, to install that, run below command.

go get github.com/golang/protobuf/protoc-gen-go

After this, above issue should be fixed.

PLUGIN  GOLANG  PROTO BUFFER 

Share on Facebook  Share on Twitter  Share on Weibo  Share on Reddit 

  RELATED


  0 COMMENT


No comment for this article.