Mac下,protoc-gen-go-grpc: program not found or is not executable问题的解决

一 问题来源

      在公司的项目中,需要把对应的proto文件生成对应的pb文件,当执行protoc相关命令时,出现报错: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. 如下图所示:


在这里插入图片描述

      造成的后果是,对应的pb文件没有被生成!


二 出现的原因以及解决方法

      出现这个问题的原因,简单说,就是protoc-gen-go-grpc没有被安装,导致执行脚本的时候,没有找到对应的插件去处理。
       在网上找了下对应的问题,看了不少文章,解决的方案就是安装

你可能感兴趣的:(Go开发集合,工具使用,golang,protoc,grpc,brew,macos)