Skip to content

Instantly share code, notes, and snippets.

@a8uhnf
Created June 7, 2018 20:58
Show Gist options
  • Save a8uhnf/a456766aef9c385a071c6961dbcd9252 to your computer and use it in GitHub Desktop.
Save a8uhnf/a456766aef9c385a071c6961dbcd9252 to your computer and use it in GitHub Desktop.
install protoc include go_grpc_gateway, go_grpc_swagger etc
# 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