How to install protobuf 2.5 on Arch Linux to compile hasoop 2.6.0 using maven 3.3.1

I want to install protobuf 2.5.0 on Arch Linux, so that protoc-2.5.0.so is installed on the OS, so that I can continue to create hadoop 2.6.0 from the source and make my life easy! :)

BTW, protobuf 2.6.0 does not compile when hasoop is built from source code. I also tried to do this. Ubuntu 14.04 ships with protoc 2.5.0. I do NOT want to use Ubuntu.

First check the screenshot (no protobuf 2.5.0), as the problem is there. I think I get the following exception, I know that protoc is not installed in arch linux at the moment.

[ERROR] Failed to complete the target org.apache.hadoop: hadoop-maven-plugins: 2.6.0: protoc (compile-protoc) according to the hasoop-common project: org.apache.maven.plugin.MojoExecutionException: "protoc -version" did not return the version → [Help 1]

Please help me, since I spent 4 hours every day from two days, no luck.

+6
source share
3 answers

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.

+20
source

A simpler but not future solution (for future queries) would be to go to Arch Linux Archives: http://seblu.net/a/archive/packages/p/protobuf/

Uninstall the new version of protobuf and install the downloaded package via pacman -U protobuf-2.5.x ..

Although whenever you update Arch Linux packages through pacman, you need to make sure you do: sudo pacman -Syu --ignore protobuf

0
source

Thanks for the steps. Just wanted to add that for autogen.sh to work, I had to install the following packages (commands for mac below):

brew install gtk

brew install autoconf

brew install automake

-1
source

Source: https://habr.com/ru/post/985677/


All Articles