Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the diiference of libprotobuf-dev libprotoc-dev or protobuf-compiler

What's the difference of the following code:

sudo apt install libprotobuf-dev
sudo apt install libprotoc-dev
sudo apt install protobuf-compiler

I'll appreciate it if you help me.

like image 414
Yunbin Liu Avatar asked Oct 29 '25 08:10

Yunbin Liu


1 Answers

protobuf

Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages. You can even update your data structure without breaking deployed programs that are compiled against the "old" format.

To install protobuf, you need to install the protocol compiler used to compile .proto files and the protobuf runtime for your chosen programming language.

You can find protobuf's documentation on the Google Developers site.

The following binary packages can be built from the corresponding Ubuntu source package:

  • libprotobuf-dev
  • libprotoc-dev
  • protobuf-compiler

libprotobuf-dev

Protocol buffers C++ library (development files) and proto files.

This package contains the development headers and static libraries needed for writing C++ applications. Includes well known proto type files.

libprotoc-dev

Protocol buffers compiler library (development files).

This package contains the development headers and static library needed for writing protobuf compilers.

protobuf-compiler

Protocol buffers compiler for definition files.

This package contains the protocol buffer compiler that is used for translating from .proto files (containing the definitions) to the language binding for the supported languages. In other words, it can generate C++, Java and Python source code for the classes defined in .proto files.

like image 53
Aliaksandr Adzinets Avatar answered Oct 31 '25 12:10

Aliaksandr Adzinets