2013-10-24 20 views
1

下用Hadoop工作我下面"working with Hadoop under Eclipse"並試圖運行幹線不編譯,因爲libprotoc的Eclipse

$ mvn install -DskipTests 

一段時間後,當已經老了,我收到了一個錯誤:

[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: protoc version is 'libprotoc 2.4.1', expected version is '2.5.0' -> [Help 1]

它與what is reported in this page相同。

有誰知道如何解決它?我應該如何升級libprotoc?

+0

-1沒有做基礎知識。 –

回答

4

Protocol Buffers被用作不同守護進程之間的RPC協議。某些Linux版本沒有所需的版本。因此,協議緩衝區代碼必須從here下載,內置並安裝。這些是來自下載軟件包中README.txt的說明。

To build and install the C++ Protocol Buffer runtime and the Protocol Buffer compiler (protoc) execute the following: 

$ ./configure 
$ make 
$ make check 
$ make install 

If "make check" fails, you can still install, but it is likely that some features of this library will not work correctly on your system. Proceed at your own risk. "make install" may require superuser privileges. 
0

不要忘記安裝protoc後共享庫鏈接:

ldconfig

2

執行此bash函數,這將下載protobuffer 2.5.0,並與sudo許可安裝。 (測試在Ubuntu 13.04)

configureProtoc(){                      
      sudo apt-get install -y gcc g++ make maven cmake zlib zlib1g-dev libcurl4-openssl-dev   
      curl -# -O https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz       
      gunzip protobuf-2.5.0.tar.gz                 
      tar -xvf protobuf-2.5.0.tar                  
      cd protobuf-2.5.0                    
      ./configure --prefix=/usr                  
      make                       
      sudo make install                    
    }