基于码云代码服务快速编译安装gRPC

目录

安装依赖工具集

下载源代码

变更Git Submodule的源地址

安装Protobuf

编译安装gRPC

测试安装结果


目前访问国外源代码服务非常不稳定,从GitHub等开源服务器下载代码越来越慢,所以想把一些常用的开源项目转移到码云服务器进行管理和下载,快速便捷,也防止了防火墙的短时间封锁。(建议大家对于一些常用的开源项目建立本地的代码库镜像)

安装依赖工具集

#安装 pkg-config
sudo apt-get install pkg-config

#安装其他依赖工具
sudo apt-get install autoconf automake libtool make g++ unzip
sudo apt-get install libgflags-dev libgtest-dev
sudo apt-get install clang libc++-dev

下载源代码

git clone https://gitee.com/githubplus/grpc.git

变更Git Submodule的源地址

因为要保持代码库的纯净性,所以没有把submodule的地址提交到服务器,还是建议在本地手动修改。

1、修改.gitmodules文件(注意branch不要修改)

[submodule "third_party/zlib"]
	path = third_party/zlib
	url = https://gitee.com/githubplus/zlib
	# When using CMake to build, the zlib submodule ends up with a
	# generated file that makes Git consider the submodule dirty. This
	# state can be ignored for day-to-day development on gRPC.
	ignore = dirty
[submodule "third_party/protobuf"]
	path = third_party/protobuf
	url = https://gitee.com/githubplus/protobuf.git
	branch = 3.0.x
[submodule "third_party/gflags"]
	path = third
  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值