Last active
February 21, 2023 10:40
-
Star
(190)
You must be signed in to star a gist -
Fork
(59)
You must be signed in to fork a gist
-
-
Save sofyan-ahmad/37787e5ed098c97919b8c593f0ec44d8 to your computer and use it in GitHub Desktop.
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 |
Change chwon to chown
thanks . workeed
Awesome !! Worked.
I added auto get version and made it work as a script file
#! /bin/bash
TEMP_DIR=/tmp
VERSION=`curl --silent "https://api.github.com/repos/protocolbuffers/protobuf/releases/latest" | grep -Po '"tag_name": "v\K.*?(?=")'`
[[ -z VERSION ]] && echo "Could not get version from github"
mkdir $TEMP_DIR/protoc_inst
cd $TEMP_DIR/protoc_inst
# Make sure you grab the latest version
curl -OL "https://github.com/google/protobuf/releases/download/v$VERSION/protoc-$VERSION-linux-x86_64.zip"
# Unzip
unzip "protoc-$VERSION-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/
rm -rf $TEMP_DIR/protoc_inst
How to solve the problem that is:
Protobuf compiler version 3.6.1 doesn't match library version 3.0.0?
Thank you.
THX!
thanks
Thanks!
Great!! Thanks.
awesome
Awesome!! Helpful!!
pleasure
…On Wed, Sep 18, 2019 at 5:09 PM Ashit Kumar ***@***.***> wrote:
Awesome!! Helpful!!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/37787e5ed098c97919b8c593f0ec44d8?email_source=notifications&email_token=AISNKQQZV75LS6MLNUCL763QKIZBJA5CNFSM4HSHKK32YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAFZATE#gistcomment-3031346>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AISNKQSZ3IIQQAH6RNKMXJ3QKIZBJANCNFSM4HSHKK3Q>
.
Here the link to my Gist if you are interested in recovering the previous version of protobuf installed on your pc (Ubuntu 16.04).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi How to install google protobuf along with protoc ?