Skip to content

Instantly share code, notes, and snippets.

@gomaglev
Last active March 6, 2024 16:23
Show Gist options
  • Save gomaglev/161d1a9e9d4c298556623a5e80221b97 to your computer and use it in GitHub Desktop.
Save gomaglev/161d1a9e9d4c298556623a5e80221b97 to your computer and use it in GitHub Desktop.
Install protoc 3.0 for Go on Mac osx

Download latest version

Protobuf

cd ~
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protoc-3.14.0-osx-x86_64.zip

Unzip file

unzip protoc-3.14.0-osx-x86_64.zip -d protoc3_install

Move protoc to $GOPATH/bin/

sudo mv protoc3_install/bin/* $GOPATH/bin/

Move include to $GOPATH/include/

sudo mv protoc3_install/include/* $GOPATH/include/

Add permission

sudo chmod +x $GOPATH/bin/protoc

Cleanup

rm -rf protoc3_install
rm -rf protoc-3.14.0-osx-x86_64.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment