JoshWindsor 发表于 2023-2-24 05:41

通过Gitee安装Protobuf

先放需要用到的git库:
核心Protobuf库:
第三方库:
先是下载对应的库
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版本。
<hr/>至于为什么要通过gitee,不觉得github直接下载超级慢么!
页: [1]
查看完整版本: 通过Gitee安装Protobuf