Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the exceptions to the Ubuntu compiled Hadoop source code

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you the "Ubuntu compiled Hadoop source code what are the anomalies", the content is easy to understand, clear, hope to help you solve the doubt, the following let the editor lead you to study and learn about "Ubuntu compiled Hadoop source code what are the anomalies" this article.

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

Install protoc

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

(download https://code.google.com/p/protobuf/downloads/list here)

Decompress it, go to the root directory and execute sudo. / configure-- prefix=/usr

If the installation error is reported:

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

Then install glossy +

Sudo apt-get install gathers +

Sudo make

Sudo make check

Sudo make install

Protoc-version

When you encounter protoc: error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory, such as ubuntu system, it is installed under / usr/local/lib by default, and / usr needs to be specified. Sudo. / configure-- prefix=/usr must add the-- proix parameter, recompile and install.

Error 2:

[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: Execute failed: java.io.IOException: Cannot run program "cmake" (in directory "/ home/wyf/hadoop-2.0.2-alpha-src/hadoop-common-project/hadoop- common/target/native") java.io.IOException: error=2 No such file or directory-> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the-e switch. [ERROR] Re-run Maven using the-X switch to enable full debug logging [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Install Cmake

Sudo apt-get install cmake

Error 3:ERROR] Failed to execute goalorg.codehaus.mojo.jspc:jspc-maven-plugin:2.0-alpha-3:compile (hdfs) on project hadoop-hdfs: Execution hdfs of goalorg.codehaus.mojo.jspc:jspc-maven-plugin:2.0-alpha-3:compile failed: Pluginorg.codehaus.mojo.jspc:jspc-maven-plugin:2.0-alpha-3 or one of its dependenciescould not be resolved: Could not transfer artifact ant:ant:jar:1.6.5 from/tocentral (http : / / repo.maven.apache.org/maven2): GET request of:ant/ant/1.6.5/ant-1.6.5.jar from central failed: Read timed out-> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors Re-run Maven with the-eswitch. [ERROR] Re-run Maven using the-X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, pleaseread the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException[ERROR][ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn-rf: hadoop-hdfs

Install ant

1. Download ant first

Baidu network disk: apache-ant-1.9.4-bin.tar.gz

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

Or the following link:

Apache-ant-1.9.4-bin.tar.gz

two。 Decompression

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

3. Configure environment variables

Vim / .bashrc

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

Export PATH=$ANT_HOME:$PATH

Source / .bashrc

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

Protobuf version is too low

Just install version 2.5

Error 5: [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: [ERROR] / home/ngc/Char/snap/hadoop-snappy/hadoop-snappy-read-only/maven/build-compilenative.xml:75: exec returned: 2

This reason is disgusting, because Hadoop snappy still has requirements for the gcc version, because I am ubuntu12.04 in December 2012, so gcc is already 4.6, but when I saw someone in google code saying that he had ok from gcc4.6 to gcc4.4, I did, too, and sure enough, this error was gone.

Gcc-- version # View gcc version

Gcc (Ubuntu/Linaro 4.4.7-1ubuntu2) 4.6.3

Copyright ©2010 Free Software Foundation, Inc.

This program is free software; please refer to the copyright notice of the source code. There is no guarantee for this software.

Including warranties without merchantability and fitness for a particular purpose.

How to fall back?

1. Apt-get install gcc-4.4

2. Rm / usr/bin/gcc

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

After that, gcc-- version, you will find that gcc has become 4.4.7.

Error 6: [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 [exec] / usr/bin/ld : cannot find-ljvm [exec] collect2: ld returned 1 exit status [exec] make: * * [libhadoopsnappy.la] error 1 [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

There are a lot of blogs like usr/bin/ld: cannot find-lxxx online, but here, I'm telling you, none of them apply. Because there is nothing missing here, nor is it the wrong version, it is because there is no libjvm.so symbolic link for installing jvm to usr/local/lib. If your system is amd64, you can go to / root/bin/jdk1.6.0_37/jre/lib/amd64/server/ to see where libjvm.so link goes, and modify it here as follows:

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

The problem can be solved.

Error 7: [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] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the-e switch. [ERROR] Re-run Maven using the-X switch to enable full debug logging. Install zlib-develubuntu is sudo apt-get install zlib1g-dev error 8: [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 [ERROR] around Ant part. @ 5ERROR 120 in / home/xxl/hadoop-2.5.2-src/hadoop-tools/hadoop-pipes/target/antrun/build-main.xml [ERROR]-> [Help 1]

Installation: sudo apt-get install libssl-dev

Error 9: [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 [ERROR] around Ant part. @ 21:96 in / home/xxl/hadoop-2.5.2-src/hadoop-dist/target/antrun/build-main.xml

Installation: sudo apt-get install build-essential

Sudo apt-get install libglib2.0-dev

These are all the contents of this article entitled "what are the anomalies in Ubuntu compiling Hadoop source code?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report