1. sudo apt-get install autoconf automake libtool curl make g++ unzip -y
2. Download the appropriate release here:
https://github.com/protocolbuffers/protobuf/releases/tag/v3.5.1 <protobuf-all-3.5.1.tar.gz
>
3. Unzip the folder
4. Enter the folder and run ./autogen.sh && ./configure && make
5. Then run these other commands. They should run without issues:
$ make check
$ sudo make install
$ which protoc
$ sudo ldconfig
$ protoc --version
Last active
May 12, 2025 11:14
-
-
Save jambonn/1f5fffc23f97f8413372a438739c1bff to your computer and use it in GitHub Desktop.
How to Install Protobuf on Ubuntu 20.04
Then how do you install the newer version?
Follow these steps to install the Protocol Buffers compiler (protoc
) version 24.4:
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.4/protoc-24.4-linux-x86_64.zip
unzip protoc-24.4-linux-x86_64.zip -d protoc-24.4
sudo mv protoc-24.4/bin/protoc /local/bin/
sudo mv protoc-24.4/include/* /local/include/
protoc --version
If you still get an error when running protoc --version
, try copying the binary to /bin
cd /local/bin
sudo cp protoc /bin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For those who work with newer protobuf versions: In the meantime the installation process has changed, the installation shown here no longer applies.