Created
June 7, 2018 20:58
-
-
Save a8uhnf/a456766aef9c385a071c6961dbcd9252 to your computer and use it in GitHub Desktop.
install protoc include go_grpc_gateway, go_grpc_swagger etc
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
# Make sure you grab the latest version | |
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip | |
# Unzip | |
unzip protoc-3.2.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 chwon $USER /usr/local/bin/protoc | |
sudo chwon -R $USER /usr/local/include/google | |
# install other plugin [gateway, swagger,go] | |
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway | |
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger | |
go get -u github.com/golang/protobuf/protoc-gen-go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment