我正在尝试从Windows 7上的源代码安装Hadoop 2.4.1,我在最后一个阶段遇到了以下错误。我搜索了一个解决方案,但无济于事。
O / S Windows 7:6.1(32位)
Java:java版本" 1.8.0_11"
protoc 2.5.0
Apache Maven 3.2.2
我使用本教程:http://wiki.apache.org/hadoop/Hadoop2OnWindows和http://www.srccodes.com/p/article/38/build-install-configure-run-apache-hadoop-2.2.0-microsoft-windows-os
Maven命令:mvn package -Pdist,native-win -DskipTests -Dtar
请帮忙。
错误代码:
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Hadoop Distribution 2.4.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (create-testdirs) @ hadoop-dist ---
[INFO] Executing tasks
main:
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.2:resources (default-resources) @ hadoop-dist ---
[INFO] Using default encoding to copy filtered resources.
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ hadoop-dist ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.2:testResources (default-testResources) @ hadoop-dist ---
[INFO] Using default encoding to copy filtered resources.
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ hadoop-dist ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) @ hadoop-dist ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (dist) @ hadoop-dist ---
[INFO] Executing tasks
main:
[exec]
[exec] Current directory /cygdrive/c/hdc/hadoop-dist/target
[exec]
[exec] $ rm -rf hadoop-2.4.1
[exec] $ mkdir hadoop-2.4.1
[exec] $ cd hadoop-2.4.1
[exec] $ cp -r /cygdrive/c/hdc/hadoop-common-project/hadoop-common/target/hadoop-common-2.4.1/bin /cygdrive/c/hdc/ha
doop-common-project/hadoop-common/target/hadoop-common-2.4.1/etc /cygdrive/c/hdc/hadoop-common-project/hadoop-common/targ
et/hadoop-common-2.4.1/libexec /cygdrive/c/hdc/hadoop-common-project/hadoop-common/target/hadoop-common-2.4.1/sbin /cygdr
ive/c/hdc/hadoop-common-project/hadoop-common/target/hadoop-common-2.4.1/share .
[exec] cp.exe: /cygdrive/c/hdc/hadoop-common-project/hadoop-common/target/hadoop-common-2.4.1/bin: No such file or d
irectory
[exec] cp.exe: /cygdrive/c/hdc/hadoop-common-project/hadoop-common/target/hadoop-common-2.4.1/etc: No such file or d
irectory
[exec] cp.exe: /cygdrive/c/hdc/hadoop-common-project/hadoop-common/target/hadoop-common-2.4.1/libexec: No such file
or directory
[exec] cp.exe: /cygdrive/c/hdc/hadoop-common-project/hadoop-common/target/hadoop-common-2.4.1/sbin: No such file or
directory
[exec] cp.exe: /cygdrive/c/hdc/hadoop-common-project/hadoop-common/target/hadoop-common-2.4.1/share: No such file or
directory
[exec]
[exec] Failed!
[exec]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................. SUCCESS [ 4.006 s]
[INFO] Apache Hadoop Project POM .......................... SUCCESS [ 1.592 s]
[INFO] Apache Hadoop Annotations .......................... SUCCESS [ 4.343 s]
[INFO] Apache Hadoop Assemblies ........................... SUCCESS [ 0.233 s]
[INFO] Apache Hadoop Project Dist POM ..................... SUCCESS [ 3.262 s]
[INFO] Apache Hadoop Maven Plugins ........................ SUCCESS [ 4.871 s]
[INFO] Apache Hadoop MiniKDC .............................. SUCCESS [ 4.450 s]
[INFO] Apache Hadoop Auth ................................. SUCCESS [ 3.150 s]
[INFO] Apache Hadoop Auth Examples ........................ SUCCESS [ 3.384 s]
[INFO] Apache Hadoop Common ............................... SUCCESS [02:26 min]
[INFO] Apache Hadoop NFS .................................. SUCCESS [ 9.297 s]
[INFO] Apache Hadoop Common Project ....................... SUCCESS [ 0.058 s]
[INFO] Apache Hadoop HDFS ................................. SUCCESS [03:31 min]
[INFO] Apache Hadoop HttpFS ............................... SUCCESS [ 34.454 s]
[INFO] Apache Hadoop HDFS BookKeeper Journal .............. SUCCESS [ 9.568 s]
[INFO] Apache Hadoop HDFS-NFS ............................. SUCCESS [ 4.962 s]
[INFO] Apache Hadoop HDFS Project ......................... SUCCESS [ 0.071 s]
[INFO] hadoop-yarn ........................................ SUCCESS [ 0.055 s]
[INFO] hadoop-yarn-api .................................... SUCCESS [ 42.210 s]
[INFO] hadoop-yarn-common ................................. SUCCESS [ 36.877 s]
[INFO] hadoop-yarn-server ................................. SUCCESS [ 0.048 s]
[INFO] hadoop-yarn-server-common .......................... SUCCESS [ 7.941 s]
[INFO] hadoop-yarn-server-nodemanager ..................... SUCCESS [ 14.402 s]
[INFO] hadoop-yarn-server-web-proxy ....................... SUCCESS [ 2.625 s]
[INFO] hadoop-yarn-server-applicationhistoryservice ....... SUCCESS [ 4.543 s]
[INFO] hadoop-yarn-server-resourcemanager ................. SUCCESS [ 16.911 s]
[INFO] hadoop-yarn-server-tests ........................... SUCCESS [ 1.438 s]
[INFO] hadoop-yarn-client ................................. SUCCESS [ 3.495 s]
[INFO] hadoop-yarn-applications ........................... SUCCESS [ 0.042 s]
[INFO] hadoop-yarn-applications-distributedshell .......... SUCCESS [ 2.033 s]
[INFO] hadoop-yarn-applications-unmanaged-am-launcher ..... SUCCESS [ 1.682 s]
[INFO] hadoop-yarn-site ................................... SUCCESS [ 0.051 s]
[INFO] hadoop-yarn-project ................................ SUCCESS [ 3.453 s]
[INFO] hadoop-mapreduce-client ............................ SUCCESS [ 0.117 s]
[INFO] hadoop-mapreduce-client-core ....................... SUCCESS [ 33.057 s]
[INFO] hadoop-mapreduce-client-common ..................... SUCCESS [ 23.963 s]
[INFO] hadoop-mapreduce-client-shuffle .................... SUCCESS [ 2.181 s]
[INFO] hadoop-mapreduce-client-app ........................ SUCCESS [ 13.202 s]
[INFO] hadoop-mapreduce-client-hs ......................... SUCCESS [ 8.889 s]
[INFO] hadoop-mapreduce-client-jobclient .................. SUCCESS [ 7.842 s]
[INFO] hadoop-mapreduce-client-hs-plugins ................. SUCCESS [ 1.379 s]
[INFO] Apache Hadoop MapReduce Examples ................... SUCCESS [ 5.019 s]
[INFO] hadoop-mapreduce ................................... SUCCESS [ 3.700 s]
[INFO] Apache Hadoop MapReduce Streaming .................. SUCCESS [ 3.600 s]
[INFO] Apache Hadoop Distributed Copy ..................... SUCCESS [ 12.786 s]
[INFO] Apache Hadoop Archives ............................. SUCCESS [ 2.083 s]
[INFO] Apache Hadoop Rumen ................................ SUCCESS [ 6.695 s]
[INFO] Apache Hadoop Gridmix .............................. SUCCESS [ 4.275 s]
[INFO] Apache Hadoop Data Join ............................ SUCCESS [ 1.995 s]
[INFO] Apache Hadoop Extras ............................... SUCCESS [ 2.223 s]
[INFO] Apache Hadoop Pipes ................................ SUCCESS [ 0.042 s]
[INFO] Apache Hadoop OpenStack support .................... SUCCESS [ 4.186 s]
[INFO] Apache Hadoop Client ............................... SUCCESS [ 7.937 s]
[INFO] Apache Hadoop Mini-Cluster ......................... SUCCESS [ 0.158 s]
[INFO] Apache Hadoop Scheduler Load Simulator ............. SUCCESS [ 3.874 s]
[INFO] Apache Hadoop Tools Dist ........................... SUCCESS [ 5.658 s]
[INFO] Apache Hadoop Tools ................................ SUCCESS [ 0.038 s]
[INFO] Apache Hadoop Distribution ......................... FAILURE [ 2.740 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12:23 min
[INFO] Finished at: 2014-07-18T17:43:34+04:00
[INFO] Final Memory: 65M/238M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (dist) on project hadoop-dist: An Ant
BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec failonerror="true" dir="C:\hdc\hadoop-dist\target" executable="sh">... @ 34:76 in C:\hdc
\hadoop-dist\target\antrun\build-main.xml
[ERROR] -> [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 <goals> -rf :hadoop-dist
答案 0 :(得分:1)
我遇到了同样的问题。
&#34; Reactor Summar&#34;上面有一些信息 如 &#34; cp:无法打开`/cygdrive/c/hadoop/hadoop-common-project/hadoop-common/target/hadoop-common-3.0.0-SNAPSHOT/bin/hadoop.dll'阅读:权限被拒绝&#34;。
只需以管理员
运行命令提示符即可答案 1 :(得分:0)
我遇到了同样的问题 - 从Cygwin内部运行Maven命令,并按照here中的说明进行操作,直到第5步。
答案 2 :(得分:0)
我遇到了同样的问题,我通过这样做来解决这个问题:
sudo apt-get install zlib1g-dev
sudo apt-get install libssl-dev
来源:https://stackoverflow.com/a/23385780/2245718
干杯