Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lnquy/fb48795b10c1be393e9d86bddd7d9354 to your computer and use it in GitHub Desktop.
Save lnquy/fb48795b10c1be393e9d86bddd7d9354 to your computer and use it in GitHub Desktop.
# 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
@OLGKAD
Copy link

OLGKAD commented Oct 17, 2017

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!

@vCloudernBeer
Copy link

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

@parachutepy
Copy link

Thanks for the steps! I think the version of the release is no longer valid! hopefully can point to the newer version!

@YaEvan
Copy link

YaEvan commented Mar 11, 2022

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