protobuf 3 install

ProtobufPic2.jpg
 

Build protobuf 3

Dependencies to build Protobuf 3

$ sudo apt-get install autoconf automake libtool curl make g++ git python-dev python-setuptools unzip

Digits is Compatible with versions 3.2.x

# example location - can be customized

$ export PROTOBUF_ROOT=~/protobuf 

# Make sure you grab the latest version

$ wget https://github.com/google/protobuf/archive/v3.2.0.tar.gz

# Unzip

$ tar -xvzf v3.2.0.tar.gz

# 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

Build Protobuf 3

$ cd $PROTOBUF_ROOT 
$ ./autogen.sh 
$ ./configure 
$ make "-j$(nproc)" 
$ make install 
$ ldconfig 
$ cd python 
$ python setup.py install --cpp_implementation