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

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

    From the github repo this solution has worked for me.

    Go version is go version go1.14.1 linux/amd64

    Add this to .bashrc and source it.

    export GOROOT=/usr/local/go
    export GOPATH=$HOME/go
    export GOBIN=$GOPATH/bin
    export PATH=$PATH:$GOROOT:$GOPATH:$GOBIN
    

    https://github.com/golang/protobuf/issues/795

提交回复
热议问题