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

2019-07-15  本文已影响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

上一篇 下一篇

猜你喜欢

热点阅读