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

前端 未结 5 1892
野趣味
野趣味 2020-12-16 01:34

go version: go version go1.14 linux/amd64

go.mod

module [redacted]

go 1.14

require (
    github.com/golang/protobuf v1.4.0-rc.2
    go         


        
5条回答
  •  心在旅途
    2020-12-16 02:03

    If you haven't done, so you need to install the protoc-gen-go plugin like so:

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

    this will install the plugin (if your GOPATH is ${HOME}/go) to:

    ${HOME}/go/bin/protoc-gen-go
    

    Then when running protoc, either update your path, or set it dynamically like so:

    PATH="${PATH}:${HOME}/go/bin" protoc ...
    

提交回复
热议问题