美文网首页
记录一次在mac下安装protobuf , grpc的暗坑

记录一次在mac下安装protobuf , grpc的暗坑

作者: 布衣码农 | 来源:发表于2019-07-15 18:24 被阅读0次

今天领导临时要求将项目从restful转换成grpc,在mac上弄了一下午始终无法生成pb文件,最后才发现mac的环境变量内没有$GOPATH/bin

# 安装 brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# 安装 protobuf
brew install protobuf

#安装proto,protoc-gen-go
go get github.com/golang/protobuf/proto
go get github.com/golang/protobuf/protoc-gen-go

export GOPATH [your gopathd]
export GOPATH/bin

相关文章

网友评论

      本文标题:记录一次在mac下安装protobuf , grpc的暗坑

      本文链接:https://www.haomeiwen.com/subject/godokctx.html