Skip to content

Instantly share code, notes, and snippets.

@muka
Last active Mar 20, 2018
Embed
What would you like to do?
How to install protoc to use with grpc
#Get a release here https://github.com/google/protobuf/releases
sudo -s
cd /usr/local/include
mkdir google
wget https://github.com/google/protobuf/releases/download/v3.5.0/protoc-3.5.0-linux-x86_64.zip -O protoc.zip
unzip protoc.zip -d tmp
#install protoc
mv tmp/bin/protoc /usr/local/bin/
chmod +x /usr/local/bin/protoc
protoc --version
# should say `libprotoc 3.5.0`
mv tmp/include/google/protobuf google/
#Note: Consider cloning this somewhere else like where you keep git repos. I use ~/git for example and use a symlink
git clone https://github.com/googleapis/googleapis.git tmp/googleapis
mv tmp/googleapis/google/api/ google/
chmod 755 -R ./google
#clean up
rm -rf ./tmp/ protoc.zip
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment