Detailed tutorial on installing Protobuf 3 on Ubuntu

Detailed tutorial on installing Protobuf 3 on Ubuntu

When to install

If you use the protoc command and encounter Protoc not found, it means it is not installed. Or, if an error occurs during execution: This parser only recognizes "proto2", it means it is not version 3.0.

Installation process and possible problems

Installation Instructions

For detailed introduction, please refer to this article: A brief introduction to protobuf and installation in Ubuntu 16.04 environment

Execute the following commands in sequence to download the source code, compile and install it. It takes a long time, more than 10 minutes.

sudo apt-get install autoconf automake libtool curl make g++ unzip
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.

Possible problems

It is very likely that the following error message will appear during execution:

./autogen.sh: 4: ./autogen.sh: autoreconf: not found

Solution: Execute the following command.

sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install libtool

After the installation is complete

Run the following command to verify the installation result and view the version number.

protoc --version

Congratulations on getting libprotoc 3.9.0 or higher.

Summarize

The above is the tutorial for installing Protobuf 3 on Ubuntu introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • A brief introduction to protobuf and installation tutorial in Ubuntu 16.04 environment

<<:  MySQL multi-instance configuration solution

>>:  Detailed explanation of this pointing problem in JavaScript function

Recommend

JavaScript custom plug-in to implement tab switching function

This article shares the specific code of JavaScri...

Vue element implements table adding, deleting and modifying data

This article shares the specific code of vue elem...

CSS web page responsive layout to automatically adapt to PC/Pad/Phone devices

Preface There are many devices nowadays, includin...

HTML page jump code

Save the following code as the default homepage fi...

MySQL Daemon failed to start error solution

MySQL Daemon failed to start error solution A few...

A useful mobile scrolling plugin BetterScroll

Table of contents Make scrolling smoother BetterS...

React's component collaborative use implementation

Table of contents Nesting Parent-child component ...

Zabbix monitoring docker application configuration

The application of containers is becoming more an...

Detailed analysis of SQL execution steps

Detailed analysis of SQL execution steps Let'...

How to deploy Redis 6.x cluster through Docker

System environment: Redis version: 6.0.8 Docker v...

Centos8 (minimum installation) tutorial on how to install Python3.8+pip

After minimizing the installation of Python8, I i...

CSS Tricks to Create Wave Effects

It has always been very difficult to achieve wave...

Deploy Confluence with Docker

1. Environmental requirements 1. Docker 17 and ab...