Last active
March 20, 2018 14:04
-
-
Save muka/4cc42c478b2699f0969450a1ec1ce44c to your computer and use it in GitHub Desktop.
How to install protoc to use with grpc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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