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

前端 未结 6 1492
逝去的感伤
逝去的感伤 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:24

    Resolved by following the steps:

    Install go library using: go get -u github.com/golang/protobuf/{proto,protoc-gen-go}

    1. Run vim ~/.bash_profile
    2. Add:
    export GO_PATH=~/go
    export PATH=$PATH:/$GO_PATH/bin
    
    1. Run source ~/.bash_profile

    Reference: Unable to build protobuf to go endpoint

提交回复
热议问题