- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我面对WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
在处理 hadoop 2.3.0 的东西时 在 ubuntu 64 位 .正如互联网所说,要构建 hadoop 源并将输出放到 库 .
我遵循的步骤在这里https://github.com/prayagupd/hadoop-prayaman/blob/master/prayaman.sh#L316
所以,我创建了以下脚本来构建 hadoop 2.3.0,
[完整脚本在 github ]
configureHadoopLib(){
sudo apt-get install -y cmake
sudo apt-get install -y build-essential
sudo apt-get install g++ autoconf automake
sudo apt-get install zlib1g-dev
sudo apt-get install libssl-dev
wget http://apache.mirror.anlx.net/hadoop/core/hadoop-2.3.0/hadoop-2.3.0-src.tar.gz
tar -zxvf hadoop-2.3.0-src.tar.gz
cd hadoop-2.3.0-src/
#cd $HADOOP_HOME/src
echo
echo "#######################################################################"
echo "[INFO] Packaging hadoop source"
echo "#######################################################################"
#mvn package -Pdist,native -Dskiptests -Dtar
mvn -e package -Dmaven.javadoc.skip=true -Pdist,native -DskipTests -Dtar
echo
echo "#######################################################################"
echo "[INFO] Packaging hadoop source - completed"
echo "#######################################################################"
#cp $HADOOP_HOME/src/hadoop-dist/target/hadoop-2.3.0-cdh5.0.1/lib/native/* $HADOOP_HOME/lib/native/
#cat ~/.bash_profile > export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
#cat ~/.bash_profile > export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"
}
[INFO] Apache Hadoop Distribution ........................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:06.730s
[INFO] Finished at: Mon Aug 18 18:22:00 NPT 2014
[INFO] Final Memory: 67M/635M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project hadoop-common: An Ant BuildException has occured: exec returned: 2
[ERROR] around Ant part ...<exec dir="/home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/native" executable="make" failonerror="true">... @ 7:172 in /home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project hadoop-common: An Ant BuildException has occured: exec returned: 2
around Ant part ...<exec dir="/home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/native" executable="make" failonerror="true">... @ 7:172 in /home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: exec returned: 2
around Ant part ...<exec dir="/home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/native" executable="make" failonerror="true">... @ 7:172 in /home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:355)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: /home/prayagupd/backup/hacker_/w.jvm/hadoop-prayaman/hadoop-2.3.0-src/hadoop-common-project/hadoop-common/target/antrun/build-main.xml:7: exec returned: 2
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:646)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:327)
... 21 more
[ERROR]
[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 <goals> -rf :hadoop-common
#######################################################################
[INFO] Packaging hadoop source - completed
#######################################################################
$ protoc --version
libprotoc 2.5.0
$ mvn --version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0, vendor: Oracle Corporation
Java home: /usr/local/jdk1.7.0/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.8.0-19-generic", arch: "amd64", family: "unix"
$ ant -version
Apache Ant(TM) version 1.8.2 compiled on May 18 2012
最佳答案
如果赶时间,可以从https://github.com/mehikmat/hadoop-install/tree/cdh5/native-libs下载使用hadoop原生库的预编译版本
关于maven - 构建 hadoop 2.3.0 - 发生 Ant BuildException : exec returned: 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25364015/
我正在尝试为插件创建一个 fat jar 以便在本地使用它(因为我位于公司网络后面并且并不总是能够访问开放的互联网)。 不幸的是,打包过程失败的原因是: Failed to execute g
我在 Windows 上更新到 Android Studio (AS) 3.0 RC1。当我尝试通过 AS 或终端使用 gradle 构建我们的项目时,它停止了,Stacktrace 在最后。奇怪的是
我正在使用maven-antrun-plugin下载jre。如果我的配置是,我可以下载 org.apache.maven.plugins
我写了一个ant任务(bnd),需要提示失败。我发现指示失败的唯一方法是抛出 BuildException/ExitStatusException。但是,我不想要堆栈跟踪,因为它只会占用不必要的屏幕空
目前,我正在通过 Eclipse Neo 和 STS Gradle Plugin 运行 Gradle 2.x/3.x 构建。 。如果构建时出现问题,例如在compileJava任务中,我得到了错误的详
我试图在 Windows 7 上从源代码安装 Hadoop 2.4.1,在最后阶段出现以下错误。我搜索了解决方案,但无济于事。 操作系统 Windows 7:6.1(32 位) Java:Java 版
我在使用 Maven 3.1.1 构建 Hadoop 2.2.0 时遇到了问题,这是我得到的输出的一部分(完整日志位于 http://pastebin.com/FE6vu46M ): [INFO] -
尝试通过运行 Maven 3.2.2 在 Windows Server 2012 上构建 Hadoop 2.4.1 mvn package -Pdist,native-win -DskipTests
我正在尝试在 Android Studio 上制作 dlib-android。它是从以下位置下载的: https://github.com/tzutalin/dlib-android . 在更改了一些
我试图在Eclipse IDE中创建新的Gradle项目。但是我收到以下异常“org.gradle.tooling.BuildException:无法使用Gradle发行版'https://servi
当我通过终端或使用Grails / Groovy工具套件运行grails run-app时,会出现“编译错误” `Error Fatal error during compilation org.ap
问题出现在 Android Studio 3.0 中。 当我创建一个新项目时,一切正常,但一段时间后,出现错误 Error:org.gradle.tooling.BuildException: Fai
我在 gradle 构建过程中遇到了这个问题: org.gradle.tooling.BuildException: Failed to execute aapt at com.and
我面对WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using built
我正在尝试为我的应用程序生成 apk,并且运行了以下命令: 所有错误: org.gradle.tooling.BuildException: Failed to process resources,
将我的 AS 升级到 3.0 Canary 3 后,我无法编译我的应用程序。以下是堆栈跟踪: * Exception is: org.gradle.api.tasks.TaskExecutionExc
我正在尝试让 Maven 为一些遗留代码调用 ANT 构建。 ant 构建通过 ant 正确构建。但是,当我使用 maven ant 插件调用它时,它失败并出现以下错误: [ERROR] Failed
您好,我正在尝试在 Windows 8.1 上构建 hadoop 2.6.0。不幸的是到目前为止没有运气。 我已经安装了: jdk1.7.0_71(将值为 C:\Program Files\Java\
我有一个 2.2.4 Grails 项目 手数域类(~360),我正在使用 GGTS 3.3.0。 这些 360 个域类是由逆向工程插件生成的。 问题是我无法在GGTS中编译我的项目,接收 Error
我正在尝试在装有 Windows 10 家庭版的开发计算机上构建以下 hadoop 版本 hadoop-2.7.3-src 以下是我本地开发环境的详细信息: -Windows 10 家庭版 -英特尔酷
我是一名优秀的程序员,十分优秀!