protoc-gen-go: program not found or is not executable

前端 未结 6 1476
逝去的感伤
逝去的感伤 2021-01-02 03:34

I am trying to build a sample app with go grpc but I am unable to generate the code using \"protoc\"

Have installed the required libraries/go packages using:

6条回答
  •  执念已碎
    2021-01-02 04:10

    Make sure your GOBIN is set in the PATH variable. Otherwise, you may encounter this problem. Check GOBIN path by running go env and confirm GOBIN is not empty.

    If it is empty then try like below

    export GOPATH=$HOME/go
    PATH=$PATH:$GOPATH/bin
    protoc --go_out=plugins=grpc:. *.proto
    

提交回复
热议问题