Protocol Buffer, abbreviated as Protobuf, is an open source library developed by Google that allows to serialize or deserialize structured data. It is used to communicate with one another over a network and to store data when building applications.

In this article we are going to install Protobuf on Ubuntu (Linux OS) by below mentioned methods, you can follow any of these methods for successful installation of Protobuf.

Installation of Protobuf Using Command Line on Ubuntu:

We can install Protobuf by giving commands on Ubuntu terminal:

Step1: Update the Packages : Firstly, you need to update all the previous packages installed on your system:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-288.png" data-lazy- height="480" src="data:image/svg xml,” width=”735″>

Step2: Install Protobuf : Now to install Protobuf compiler on your Ubuntu system, run the below mentioned command:

$ sudo apt install protobuf-compiler

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-289.png" data-lazy- height="479" src="data:image/svg xml,” width=”736″>

Uninstall Protobuf from Ubuntu system using terminal

Run the below mentioned command to remove protobuf-compiler installed from above method:

$ sudo apt-get remove protobuf-compiler

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-290.png" data-lazy- height="482" src="data:image/svg xml,” width=”734″>

Run the below mentioned command to remove its dependent packages:

$ sudo apt-get autoremove protobuf-compiler

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-291.png" data-lazy- height="480" src="data:image/svg xml,” width=”732″>

Installation of Protobuf Using Ubuntu Software Center

We can also install Protobuf using another method, by directly installing it through Ubuntu software Manager. Follow the step below for successful installation:

Step1: Login to Ubuntu System, open the Ubuntu software Manager by double clicking on the icon.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-292.png" data-lazy- height="609" src="data:image/svg xml,” width=”1365″>

Step 2: Now in the explore tab click on the search tab and write “Protobuf”:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-293.png" data-lazy- height="605" src="data:image/svg xml,” width=”1362″>

Step 3: Now click on “Protobuf” option shown in the list below:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-294.png" data-lazy- height="608" src="data:image/svg xml,” width=”1362″>

Step4: A new window will be opened now click on install button to start the installation of “protobuf-compiler”:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-295.png" data-lazy- height="604" src="data:image/svg xml,” width=”1362″>

Step 5: After you click on install, an authentication tab will be opened, you have to enter your login password there and click on “Authenticate”:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-296.png" data-lazy- height="595" src="data:image/svg xml,” width=”1363″>

Step 6: You can see your installation progress below:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-297.png" data-lazy- height="597" src="data:image/svg xml,” width=”1362″>

Step 7: After Protobuf is installed, you can check it by going to installed tab on Ubuntu software, it will appear in list of apps if installed successfully, as it is shown below:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-298.png" data-lazy- height="585" src="data:image/svg xml,” width=”1362″>

Remove Protobuf from Ubuntu System using software center

If you don’t need protobuf installed by above method and want to remove it then follow the steps given below:

Open the ubuntu software manager and click on installed tab:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-299.png" data-lazy- height="550" src="data:image/svg xml,” width=”1362″>

Now search for “Protobuf” from the list of apps and click on “Remove” button in front of it as shown below:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-300.png" data-lazy- height="602" src="data:image/svg xml,” width=”1363″>

A permission dialogue box will get open click on “Remove” to uninstall the application:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/09/echo/word-image-301.png" data-lazy- height="550" src="data:image/svg xml,” width=”1362″>

And now protobuf will be uninstalled successfully and no longer exist in the list.

Conclusion

Protobuf is a free and cross platform library used for serialization and deserialization of structured data. In this write up we discussed two methods of installation of Protobuf on Ubuntu system and also its uninstallation. One method is using the command-line on Ubuntu and the other one is using Ubuntu Software Manager, you can follow any of these, you find it easy.

About the author

<img alt="" data-lazy-src="https://secure.gravatar.com/avatar/7c99efcc024949e17b176845c757687e?s=112&r=g" data-lazy- height="112" src="data:image/svg xml,” width=”112″>

Alishba Iftikhar

I am currently an undergraduate student in my 1st year. I am an internee author with Linuxhint and loved learning the art of technical content writing from senior authors. I am looking forward to opting my career as a full time Linux writer after I graduate.