gogo_out: protoc-gen-gogo: Plugin failed

[root@linuxkk charge]# protoc -I=. -I=../../../ -I=../../../github.com/gogo/protobuf --gogo_out=./ charge.proto
protoc-gen-gogo: program not found or is not executable
--gogo_out: protoc-gen-gogo: Plugin failed with status code 1.

 

编译proto文件文件时候碰到这个错误,记录一下linux

1,看看环境变量GOPATH/bin下面是否没有安装protoc-gen-gogo程序git

发现没有安装,就安装一下github

#go get github.com/gogo/protobuf/gogoprotobash

若是已经安装,检查一下 PATH里面是否有添加 GOPATH/bin code

#echo $PATHblog

正确安装gogo/protobuf和配置好环境变量,基本上就能够修复这个问题~get

相关文章
相关标签/搜索