Home >Backend Development >Golang >Why is `protoc-gen-go-grpc` Not Found and How Do I Fix It?

Why is `protoc-gen-go-grpc` Not Found and How Do I Fix It?

Barbara Streisand
Barbara StreisandOriginal
2024-12-23 16:47:101029browse

Why is `protoc-gen-go-grpc` Not Found and How Do I Fix It?

protoc-gen-go-grpc: Unable to Locate or Execute

Encountering the error "protoc-gen-go-grpc: program not found or is not executable" while attempting to generate GRPC output files using the command "protoc -I ./src/pbdefs/protos/ --go-grpc_out=. src/pbdefs/protos/*.proto" indicates a missing plugin required for the process.

Solution:

The missing plugin is available at https://github.com/grpc/grpc-go. To resolve the issue, execute the following command:

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

This command should install the necessary plugin and allow you to successfully generate your GRPC output files.

The above is the detailed content of Why is `protoc-gen-go-grpc` Not Found and How Do I Fix It?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn