安装micro

栏目: Go · 发布时间: 7年前

内容简介:macos本地安装micro框架安装过程中因为长城的原因,会有很多依赖下载失败,例如

安装micro

macos本地安装micro框架

1. 安装micro和所需依赖

go get -u -v github.com/micro/micro

安装过程中因为长城的原因,会有很多依赖下载失败,例如 x/net , x/text , x/crypt , grcp 等,后面有安装方法。

2. 安装consul

brew install consul

3. 安装Protobuf

brew install protobuf
go get -u -v github.com/golang/protobuf/{proto,protoc-gen-go}
go get -u -v github.com/micro/protoc-gen-micro

4. 安装grpc和genproto

mkdir $GOPATH/src/google.golang.org
cd $GOPATH/src/google.golang.org

git clone https://github.com/grpc/grpc-go.git grpc
git clone https://github.com/google/go-genproto.git genproto

5. 安装 golang的net,crypt,text库

mkdir -p $GOPATH/src/golang.org/x
cd $GOPATH/src/golang.org/x

git clone https://github.com/golang/net.git
git clone https://github.com/golang/crypto.git
git clone https://github.com/golang/text.git

6. 最后安装micro

go install github.com/micro/micro

micro --version
micro version 0.11.1

安装完成


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Powerful

Powerful

Patty McCord / Missionday / 2018-1-25

Named by The Washington Post as one of the 11 Leadership Books to Read in 2018 When it comes to recruiting, motivating, and creating great teams, Patty McCord says most companies have it all wrong. Mc......一起来看看 《Powerful》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具