Open In App

How to install Protobuf on Ubuntu

Last Updated : 18 Apr, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

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:

  • At the moment, generated code is supported by protocol buffers in Java, Python, Objective-C, and C++. You can work with Dart, Go, Ruby, and C# with the new proto3 language version, and more languages are on the way. 
  • Google created the protocol known as protocol buffers, or protobuf, to enable the serialization and deserialization of structured data. It was created by Google to offer a more effective method of system communication than XML. 

Installation of Protobuf on Ubuntu

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

  • Method 1: Using Command Line on Ubuntu
  • Method 2: Using Ubuntu Software Center

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.

 


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads