Open In App

How to install Protobuf on Ubuntu

A free and open-source cross-platform library called Protocol Buffers (Protobuf) is used to serialize structured data. It can be used to create programs that communicate with one another over a network or store data. A program generates source code from an interface description language that describes the structure of some data and an interface description method is used in the method to create or parse a stream of bytes that represents the structured data. For internal use, Google created Protocol Buffers and made a code generator available under an open-source license for various languages. 

Features of Protobuf:

Installation of Protobuf on Ubuntu

We can install Protobuf on Ubuntu using 2 different following methods:



Let’s go through both installation methods:

Method 1: Using Command Line on Ubuntu

Step 1: Firstly, update the repositories using the apt manager. Execute the below command to update.



sudo apt update

 

Step 2: Now, using the same apt manager install the protobuf-compiler tool through the command line.

sudo apt install protobuf-compiler

 

Step 3: To verify the installation, execute the below command and check whether the command returns the output.

protoc

 

Step 4: To check the detailed usage of protoc tool, run the manual page command to see its detailed information.

man protoc

 

Method 2: Using Ubuntu Software Center

Step 1: Open the Ubuntu Software Center. 

 

Step 2: Search for protobuf in the search section of Ubuntu Software Center.

 

Step 3: Click on the install button and enter your password for starting the installation process.

 

Step 4: We have successfully installed the protobuf application from the software center.

 

Step 5: After usage, to uninstall the application just go to the Installed section, search for the protobuf application and click on the uninstall button. The application will get uninstalled from the system.

 

Article Tags :