Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 28 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save rvegas/e312cb81bbb0b22285bc6238216b709b to your computer and use it in GitHub Desktop.
Save rvegas/e312cb81bbb0b22285bc6238216b709b 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.3.0/protoc-3.3.0-linux-x86_64.zip
# Unzip
unzip protoc-3.3.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
@Dimuthu1994
Copy link

thank you

@oleang
Copy link

oleang commented May 12, 2018

thank

@hayatibis
Copy link

It worked, thanks

@ollewelin
Copy link

Thanks

@sungwonida
Copy link

Thanks, it works.

@naveen-webonise
Copy link

Thanks for this!

@sofianinho
Copy link

Thank you @rvegas. I was able to tune it a little bit to download the latest version instead of the 3.3 with no intervention, here:
https://gist.github.com/sofianinho/9a78beff3d6fa04b0a2095fd49beb899

What do you think ?

@jeremy-rutman
Copy link

jeremy-rutman commented Sep 4, 2018

In my install (ubuntu 16.04 from an nvidia-docker container) the protoc actually being used was in /usr/bin, not /usr/local/bin, so
cp protoc3/bin/* /usr/bin
was necessary - for whatever reason, which protoc led to /usr/local/bin but the actual one being used was in /usr/bin

@SyedFarazUmar
Copy link

++ Getting the following error after using the above steps:

$ protoc --version
-bash: /usr/local/bin/protoc: cannot execute binary file: Exec format error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment