Forked from sofyan-ahmad/Install protobuf 3 on Ubuntu
Last active
March 11, 2022 09:28
-
-
Save lnquy/fb48795b10c1be393e9d86bddd7d9354 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure you grab the latest version | |
curl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip | |
# Unzip | |
unzip protoc-3.4.0-linux-x86_64.zip -d protoc3 | |
# Move protoc to /usr/local/bin/ | |
sudo mv protoc3/bin/* /usr/local/bin/ | |
# Move protoc3/include to /usr/local/include/ | |
sudo mv protoc3/include/* /usr/local/include/ | |
# Optional: change owner | |
sudo chown [user] /usr/local/bin/protoc | |
sudo chown -R [user] /usr/local/include/google |
I follow the exact instruction (except for the optional chown), and I am ok. This is a fresh protobuf install for my machine:
protoc --version
libprotoc 3.4.0
Thanks for the steps! I think the version of the release is no longer valid! hopefully can point to the newer version!
3.x same steps
curl -OL https://github.com/google/protobuf/releases/download/v3.6.0/protoc-3.6.0-linux-x86_64.zip
sudo unzip protoc-3.6.0-linux-x86_64.zip -d /usr/local/protobuf-3.6
sudo ln -s /usr/local/protobuf-3.6/bin/protoc /usr/local/bin/protoc
sudo ldconfig
protoc3.6 --version
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey Inquy,
Thanks a lot for sharing the instructions! I followed them all, but when typing "protoc --version", I still get "libprotoc 2.6.1". I wonder if I should uninstall the old version of protobuf first. I would very much appreciate it, if you give me a hint!