skip to Main Content

protoc-gen-go-grpc: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
–go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1.

not solve the problem for :
ubuntu so please give me the answers

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

and

sudo apt install golang-goprotobuf-dev

and

sudo apt-get protobuf-compiler

2

Answers


  1. You should be able to:

    go install github.com/golang/protobuf/protoc-gen-go@latest
    

    Then:

    which protoc-gen-go
    /${GOPATH}/bin/protoc-gen-go
    
    Login or Signup to reply.
  2. If you haven’t already, execute the following:

    go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
    

    This will install protoc-gen-go-grpc executable to the location indicated by $GOBIN (default if not set is $GOPATH/bin)

    $ ls $(go env GOPATH)/bin | grep 'protoc-gen-grpc-gateway'
    protoc-gen-grpc-gateway
    

    The protoc compiler is looking to run this executable, so you’ll need to make sure it is resolvable via your $PATH environment variable.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search