How To Install Protoc?
Maintainer: Laszlo Boszormenyi (GCS)
Email: [email protected] .
Website: https://github.com/google/protobuf/
Section: devel
Install protoc
-
Debian
apt-get install protobuf-compilerClick to copy -
Ubuntu
apt-get install protobuf-compilerClick to copy -
Alpine OS
apk add protobufClick to copy -
Arch Linux
pacman -S protobufClick to copy -
Kali Linux
apt-get install protobuf-compilerClick to copy -
CentOS
yum install protobuf-compilerClick to copy -
Fedora
dnf install protobuf-compilerClick to copy -
Raspbian
apt-get install protobuf-compilerClick to copy -
macOS
brew install protobufClick to copy
Parse Google Protobuf `.proto` files and generate output in the specified language.
How to use protoc?
Below are few example commands for protoc that you can use in the terminal.
Generate Python code from a `.proto` file:protoc --python_out=path/to/output_directory input_file.protoClick to copyGenerate Java code from a `.proto` file that imports other `.proto` files:protoc --java_out=path/to/output_directory --proto_path=path/to/import_search_path input_file.protoClick to copyGenerate code for multiple languages:protoc --csharp_out=path/to/c#_output_directory --js_out=path/to/js_output_directory input_file.protoClick to copy
Installation of latest protoc command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.




