ubuntu下protobuf安装

一、apt安装,版本无法指定

sudo apt update
sudo apt install libprotobuf-dev protobuf-compiler

二、下载指定版本protobuf安装包

sudo wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protobuf-all-3.19.4.tar.gz
解压
sudo tar -zxvf protobuf-all-3.19.4.tar.gz

编译安装
cd protobuf-3.19.4
sudo ./autogen.sh
sudo ./configure
sudo make
sudo make check
sudo make install
sudo ldconfig    # refresh shared library cache 刷新动态库

检查是否安装成功
protoc --version

来源:

https://www.jianshu.com/p/aad9b0253cbe


 












posted @ 2023-05-10 21:26  woodx  阅读(1223)  评论(0编辑  收藏  举报