protobuf安装_通过Gitee安装Protobuf

先放需要用到的git库:

核心Protobuf库:

码云极速下载/google-protobufsource​gitee.com
0c92b31631770ec2ca882f02015fcc99.png

第三方库:

码云极速下载/google-benchmark​gitee.com
0c92b31631770ec2ca882f02015fcc99.png
码云极速下载/googletest​gitee.com
0c92b31631770ec2ca882f02015fcc99.png

先是下载对应的库

sudo su
cd /usr/local/src
git clone https://gitee.com/mirrors/protobufsource.git protobuf
git clone https://gitee.com/mirrors/googletest.git protobuf/third_party/googletest
git clone https://gitee.com/mirrors/google-benchmark.git protobuf/third_party/benchmark

然后更新

cd protobuf
git submodule update --init --recursive
./autogen.sh

接下来是安装

 ./configure
make -j32
make check -j32
make install
ldconfig

根据自己CPU的线程数调整-j后面的数

安装完成。

protoc --version

查看protoc版本。


至于为什么要通过gitee,不觉得github直接下载超级慢么!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值