成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

Ubuntu編譯Hadoop編碼異常總結

運維 系統運維 Linux Hadoop
本文匯總了Ubuntu編譯Hadoop編碼異常,從9個錯誤的例子當中分析了相關所需要的依賴程序、環境變量、版本問題等等。

錯誤1:

  1. [ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.2.0: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]  
  2. [ERROR]  
  3. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.  
  4. [ERROR] Re-run Maven using the -X switch to enable full debug logging.  
  5. [ERROR]  
  6. [ERROR] For more information about the errors and possible solutions, please read the following articles:  
  7. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException  
  8. [ERROR]  
  9. [ERROR] After correcting the problems, you can resume the build with the command  
  10. [ERROR] mvn <goals> -rf :hadoop-common 

安裝protoc

wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz

(此處下載https://code.google.com/p/protobuf/downloads/list

解壓, 進入根目錄執行 sudo ./configure --prefix=/usr

若安裝報錯:

cpp: error trying to exec 'cc1plus': execvp: No such file or directory

則安裝g++

sudo apt-get install g++

sudo make

sudo make check

sudo make install

protoc --version

遇到protoc: error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory時,如ubuntu系統,默認安裝在/usr/local/lib下,需要指定/usr。sudo ./configure --prefix=/usr 必須加上--proix參數,重新編譯和安裝。

錯誤2:

  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-  
  2.  
  3. plugin:1.6:run (make) on project hadoop-common: An Ant BuildException has  
  4.  
  5. occured: Execute failed: java.io.IOException: Cannot run program "cmake" (in  
  6.  
  7. directory "/home/wyf/hadoop-2.0.2-alpha-src/hadoop-common-project/hadoop-  
  8.  
  9. common/target/native"): java.io.IOException: error=2, No such file or directory  
  10.  
  11. -> [Help 1]  
  12. [ERROR]  
  13. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e  
  14.  
  15. switch.  
  16. [ERROR] Re-run Maven using the -X switch to enable full debug logging.  
  17. [ERROR]  
  18. [ERROR] For more information about the errors and possible solutions, please  
  19.  
  20. read the following articles:  
  21. [ERROR] [Help 1]  
  22.  
  23. http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 

安裝Cmake

sudo apt-get install cmake

錯誤3:

  1. ERROR] Failed to execute goal org.codehaus.mojo.jspc:jspc-maven-plugin:2.0-  
  2.    
  3. alpha-3:compile (hdfs) on project hadoop-hdfs: Execution hdfs of goal  
  4.    
  5. org.codehaus.mojo.jspc:jspc-maven-plugin:2.0-alpha-3:compile failed: Plugin  
  6.    
  7. org.codehaus.mojo.jspc:jspc-maven-plugin:2.0-alpha-3 or one of its dependencies  
  8.    
  9. could not be resolved: Could not transfer artifact ant:ant:jar:1.6.5 from/to  
  10.    
  11. central (http://repo.maven.apache.org/maven2): GET request of:  
  12.    
  13. ant/ant/1.6.5/ant-1.6.5.jar from central failed: Read timed out -> [Help 1]  
  14. [ERROR]  
  15. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e  
  16.    
  17. switch.  
  18. [ERROR] Re-run Maven using the -X switch to enable full debug logging.  
  19. [ERROR]  
  20. [ERROR] For more information about the errors and possible solutions, please  
  21.    
  22. read the following articles:  
  23. [ERROR] [Help 1]  
  24.    
  25. http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException  
  26. [ERROR]  
  27. [ERROR] After correcting the problems, you can resume the build with the command  
  28. [ERROR]   mvn <goals> -rf :hadoop-hdfs 

安裝ant

1.首先下載ant

百度網盤: apache-ant-1.9.4-bin.tar.gz

http://pan.baidu.com/s/1c0vjhBy

或則下面鏈接:

apache-ant-1.9.4-bin.tar.gz

2.解壓

tar zxvf apache-ant-1.9.4-bin.tar.gz

3.配置環境變量

vim ~/.bashrc

export ANT_HOME=/home/xxl/apache-ant-1.9.4

export PATH=$ANT_HOME:$PATH

source ~/.bashrc

 

錯誤4:

  1. [ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.4.0:prot  
  2. oc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecut  
  3. ionException: 'protoc --version' did not return a version -> [Help 1]  
  4. [ERROR]  
  5. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit  
  6. ch.  
  7. [ERROR] Re-run Maven using the -X switch to enable full debug logging.  
  8. [ERROR]  
  9. [ERROR] For more information about the errors and possible solutions, please rea  
  10. d the following articles:  
  11. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE  
  12. xception  
  13. [ERROR]  
  14. [ERROR] After correcting the problems, you can resume the build with the command  
  15.  
  16. [ERROR]   mvn <goals> -rf :hadoop-common 

protobuf版本過低

安裝2.5版本的即可

 

錯誤5:

  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (compile) on project hadoop-snappy: An Ant BuildException has occured: The following error occurred while executing this line:  
  2. [ERROR] /home/ngc/Char/snap/hadoop-snappy/hadoop-snappy-read-only/maven/build-compilenative.xml:75: exec returned: 2 

這個原因比較惡心,是因為Hadoop snappy對gcc版本還有要求,因為我是2012年12月份的ubuntu12.04,所以gcc已經是4.6了,但是在google code那看到有人說他從gcc4.6回退成gcc4.4就ok了,我也是了一下,果然這個錯誤沒有了。

gcc --version #查看gcc版本

gcc (Ubuntu/Linaro 4.4.7-1ubuntu2) 4.6.3

Copyright © 2010 Free Software Foundation, Inc.

本程序是自由軟件;請參看源代碼的版權聲明。本軟件沒有任何擔保;

包括沒有適銷性和某一專用目的下的適用性擔保。

如何回退呢?

1. apt-get install gcc-4.4

2. rm /usr/bin/gcc

3. ln -s /usr/bin/gcc-4.4 /usr/bin/gcc

之后,再gcc --version,你就會發現,gcc已經變成4.4.7了。

錯誤6:

  1. .[exec] /bin/bash ./libtool --tag=CC   --mode=link gcc -g -Wall -fPIC -O2 -m64 -g -O2 -version-info 0:1:0 -L/usr/local//lib -o libhadoopsnappy.la -rpath /usr/local/lib src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.lo src/org/apache/hadoop/io/compress/snappy/SnappyDecompressor.lo  -ljvm -ldl  
  2.      [exec] /usr/bin/ld: cannot find -ljvm  
  3.      [exec] collect2: ld returned 1 exit status  
  4.      [exec] make: *** [libhadoopsnappy.la] 錯誤 1  
  5.      [exec] libtool: link: gcc -shared  -fPIC -DPIC  src/org/apache/hadoop/io/compress/snappy/.libs/SnappyCompressor.o src/org/apache/hadoop/io/compress/snappy/.libs/SnappyDecompressor.o   -L/usr/local//lib -ljvm -ldl  -O2 -m64 -O2   -Wl,-soname -Wl,libhadoopsnappy.so.0 -o .libs/libhadoopsnappy.so.0.0.1 

網上有很多 解決/usr/bin/ld: cannot find -lxxx 這樣的博客,但是這里,我告訴你,他們的都不適用。因為這兒既不是缺什么,也不是版本不對,是因為沒有把安裝jvm的libjvm.so symbolic link到usr/local/lib。如果你的系統時amd64,可到/root/bin/jdk1.6.0_37/jre/lib/amd64/server/察看libjvm.so link到的地方,這里修改如下:

ln -s /root/bin/jdk1.6.0_37/jre/lib/amd64/server/libjvm.so /usr/local/lib/

問題即可解決。
 

錯誤7:

  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (make) on project hadoop-common: An Ant BuildException has occured: exec returned: 1 -> [Help 1]  
  2. [ERROR]  
  3. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.  
  4. [ERROR] Re-run Maven using the -X switch to enable full debug logging.  
  5.    
  6. 安裝zlib-devel  
  7. ubuntu安裝是  
  8. sudo apt-get install zlib1g-dev 

安裝zlib-devel

ubuntu安裝是

sudo apt-get install zlib1g-dev
 

 

錯誤8:

  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project hadoop-pipes: An Ant BuildException has occured: exec returned: 1  
  2. [ERROR] around Ant part ...<exec dir="/home/xxl/hadoop-2.5.2-src/hadoop-tools/hadoop-pipes/target/native" executable="cmake" failonerror="true">... @ 5:120 in /home/xxl/hadoop-2.5.2-src/hadoop-tools/hadoop-pipes/target/antrun/build-main.xml  
  3. [ERROR] -> [Help 1] 

 

安裝:sudo apt-get install libssl-dev

 

錯誤9:

  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (tar) on project hadoop-dist: An Ant BuildException has occured: exec returned: 1  
  2. [ERROR] around Ant part ...<exec dir="/home/xxl/hadoop-2.5.2-src/hadoop-dist/target" executable="sh" failonerror="true">... @ 21:96 in /home/xxl/hadoop-2.5.2-src/hadoop-dist/target/antrun/build-main.xml 

 

安裝:sudo apt-get install build-essential

sudo apt-get install libglib2.0-dev

 

原文出自:http://my.oschina.net/laigous/blog/356552

責任編輯:林師授 來源: laigous的博客
相關推薦

2021-03-18 10:01:06

Java編譯異常運行異常

2010-01-04 10:06:56

Ubuntu gcc

2009-12-29 11:11:10

2009-07-10 16:20:48

Ubuntu安裝JDKUbuntu 7.10

2022-03-04 08:31:07

Spring異常處理

2009-08-05 18:39:54

C#異常類

2011-11-02 21:31:01

Ubuntu行情

2010-01-27 15:11:17

VC++編譯異常

2010-05-19 17:24:55

MySQL編碼

2009-12-30 16:38:44

Ubuntu內核

2010-01-07 14:31:59

Ubuntu編譯

2010-01-07 16:34:08

Ubuntu apac

2010-02-05 11:00:33

Ubuntu GCC

2009-12-30 09:22:01

Ubuntu編譯

2010-01-07 17:35:03

Ubuntu mysq

2023-03-09 11:02:40

linux編譯源碼

2010-01-07 16:47:01

2010-02-06 17:08:58

Ubuntu ngin

2010-01-04 18:56:06

Ubuntu內核

2022-08-21 16:41:04

Python異常檢測
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 久久精品网 | 男人的天堂中文字幕 | 国产视频福利一区 | 国产在线色 | 97国产一区二区精品久久呦 | 成人免费观看男女羞羞视频 | 成人av免费播放 | 91免费电影 | 亚洲高清视频一区二区 | 丁香久久| 成人午夜电影在线观看 | 欧美性网 | 狠狠伊人| 日韩在线免费视频 | 日一区二区| 95国产精品 | aaa一区 | 中文字幕日韩欧美一区二区三区 | 欧美日韩亚洲视频 | 成人性生交a做片 | 成人免费在线 | 国产精品毛片一区二区在线看 | 91精品国产综合久久精品 | 国产美女在线观看 | 成人久久| 一级毛片在线播放 | 在线精品一区二区三区 | 国产成人精品一区二区三区网站观看 | 激情视频一区 | 黑人巨大精品 | 精品一区二区在线观看 | 久久久久久高潮国产精品视 | 国产成人午夜精品影院游乐网 | 成人国内精品久久久久一区 | 一级看片免费视频囗交动图 | 男人电影天堂 | 亚洲国产精品一区二区www | www国产成人免费观看视频,深夜成人网 | 91日b| 男人的天堂中文字幕 | 免费视频一区 |