Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 31 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save olivoil/a2e0e4f3427db8b6ef4a6374f9c4cb32 to your computer and use it in GitHub Desktop.
Save olivoil/a2e0e4f3427db8b6ef4a6374f9c4cb32 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.5.1/protoc-3.5.1-linux-x86_64.zip
# Unzip
unzip protoc-3.5.1-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
@rustyhamsterr
Copy link

Thanks man 👍

@rgov
Copy link

rgov commented Feb 14, 2019

Note that this only installs the Protobuf compiler, and not the runtime library.

@ZAFERSHAMIM
Copy link

I want to compile Protoc for object detection api of Tensorflow will it work for that too, i am using ubuntu 18.04

@MeirionHughes
Copy link

you might need to install a dep too:

sudo apt-get install libatomic1

@cboulay
Copy link

cboulay commented Mar 6, 2019

I was able to get what I needed with sudo apt-get install libprotobuf-dev protobuf-compiler

@liangdzou
Copy link

@cboulay apt install gets 3.0

@machmum
Copy link

machmum commented May 9, 2019

I'm using Ubuntu 18.04, install protoc using this, and when I tried to compile my .proto file it said

protoc-gen-go: program not found or is not executable
--go_out: protoc-gen-go: Plugin failed with status code 1.

while run protoc-gen-go tell me

zsh: command not found: protoc-gen-go

Any idea how to make it works? Thanks

@Kaustubh-pande
Copy link

same problem

@bhavishkhatri
Copy link

bhavishkhatri commented Feb 17, 2020

Install protoc-gen-go using:

sudo apt install libprotobuf-dev protobuf-compiler golang-goprotobuf-dev -y

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