首页 > 系统相关 >Ubuntu编译安装protobuf

Ubuntu编译安装protobuf

时间:2022-10-14 11:23:30浏览次数:77  
标签:protobuf tar make 3.6 编译 Ubuntu 安装

一、下载源码包

下载源码URL:https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protobuf-all-3.6.1.tar.gz
也可到 https://github.com/protocolbuffers/protobuf/releases/download/ 下载其他版本

二、第三方依赖安装

sudo apt-get install autoconf automake libtool curl make g++ unzip

三、解压、编译、安装

tar -xvf protobuf-all-3.6.1.tar.gz
cd protobuf-3.6.1
./configure --prefix=/usr  #设置安装路径为/usr
make -j 8  #编译并设置线程数
make check #可以省略,不执行
sudo make install
protoc --version

标签:protobuf,tar,make,3.6,编译,Ubuntu,安装
From: https://www.cnblogs.com/limstorm/p/16791041.html

相关文章