Compiling Google protobuf is pretty straightforward. I initially learned how to do this on this blog post when compiling howo-p.
But here is my version:
$ cd /usr/local/src/ $ wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz $ tar xvf protobuf-2.5.0.tar.gz $ cd protobuf-2.5.0 $ ./autogen.sh $ ./configure --prefix=/usr $ make $ make install $ protoc --version
Install protobuf for java
$ cd java $ mvn install $ mvn package
You must be kind.
So that you can install different versions of protobuf, install stow then change ./configure --prefix=/usr to ./configure --prefix=/usr/local/stow/protobuf-2.5.0
Then the protobuf link to your stacking system:
$ cd /usr/local/stow $ stow protobuf-2.5.0
Note: stow uses / usr / local / bin by default. Make sure in your $PATH
To disable this version of protobuf,
$ stow -D protobuf-2.5.0
Hope this helps.
source share