centos下编译 protobuf

发布时间 2023-07-14 15:00:53作者: 北京开发

 

1、 git clone https://github.com/protocolbuffers/protobuf.git

2、 然后cd到protobuf目录执行:git submodule update --init --recursive

3、 然后使用yum安装对应的库,yum install autoconf automake libtool curl make g++ unzip,

4、然后执行./autogen.sh,

5、然后执行./configure --prefix=/usr,将protobuf安装到/usr目录,然后使用make进行编译

6、在使用make install进行安装

7、然后输入protoc -v查看版本号

8、然后执行ldconfig命令