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

How to implement communication between Docker containers

Scenario: A laradock development environment (php...

How to implement call, apply and bind in native js

1. Implement call step: Set the function as a pro...

GET POST Differences

1. Get is used to obtain data from the server, wh...

Detailed explanation of making shooting games with CocosCreator

Table of contents Scene Setting Game Resources Tu...

Vue3 draggable left and right panel split component implementation

Table of contents Breaking down components Left P...

Mysql Sql statement exercises (50 questions)

Table name and fields –1. Student List Student (s...

Tutorial on downloading, installing, configuring and using MySQL under Windows

Overview of MySQL MySQL is a relational database ...

JS implements user registration interface function

This article example shares the specific code of ...

Solution to incomplete text display in el-tree

Table of contents Method 1: The simplest way to s...

Implementation of select multiple data loading optimization in Element

Table of contents Scenario Code Implementation Su...

The phenomenon of margin-top collapse and the specific solution

What is margin-top collapse Margin-top collapse i...

Solution to nginx not jumping to the upstream address

Preface Today I encountered a very strange proble...

Complete example of vue polling request solution

Understanding of polling In fact, the focus of po...

Specific use of exception filter Exceptionfilter in nestjs

Speaking of Nestjs exception filter, we have to m...