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

452 views Asked by At

I'm trying to make a microservice app using protobuf and go. But I faced with problem that I've never faced before. I have my UserService.proto file that I want to compile. But when I start protoc --go_out=. --go-grpc_out=. UserService.proto command it shows me

protoc-gen-go: 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_out: protoc-gen-go: Plugin failed with status code 1.

I checked my .zshrc file but it seemed ok:

export PATH=$PATH:$(go env GOPATH)/bin

I tried to set gopath and gobin manually, but it also didn't help me:

export GOPATH=$(go env GOPATH)
export GOBIN=$(go env GOPATH)/bin

I also downloaded protoc-gen-go plugin and it is contained in bin folder of go: enter image description here

So what can be the problem? If you know, please tell me. I'd really appreciate it!

0

There are 0 answers