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

NobinPegasus

Member
Joined
Feb 4, 2022
Messages
50
Reaction score
0
Credits
447
I have installed the go plugins. Still when I try to run events.proto code it shows error:
Code:
sudo go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
sudo go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

Code:
pegasus@pegasus:~/Documents/eBPF/go-xdp-examples/gRPC_test$ tree
.
└── events.proto

1 directory, 1 file
pegasus@pegasus:~/Documents/eBPF/go-xdp-examples/gRPC_test$

Code:
pegasus@pegasus:~/Documents/eBPF/go-xdp-examples/gRPC_test$ sudo protoc --go_out=. --proto_path=/home/pegasus/Documents/eBPF/go-xdp-examples/gRPC_test --go_opt=paths=source_relative   --go-grpc_out=. --go-grpc_opt=paths=source_relative /home/pegasus/Documents/eBPF/go-xdp-examples/gRPC_test/events.proto
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.

Inside my ~/.bashrc
Code:
export PATH=$PATH:$(go env GOPATH)/bin

export PATH=$PATH:$HOME/go/bin
export PATH=$PATH:/usr/local/go/bin

How can I fix it?
 


Top