Skip to content

Instantly share code, notes, and snippets.

@muka
Last active March 20, 2018 14:04
Show Gist options
  • Save muka/4cc42c478b2699f0969450a1ec1ce44c to your computer and use it in GitHub Desktop.
Save muka/4cc42c478b2699f0969450a1ec1ce44c to your computer and use it in GitHub Desktop.
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