最终还是报了一个错:
[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 "/root/hadoop-2.2.0-src/hadoop-common-project/hadoop-common/target/native"): error=2, No such file or directory -> [Help 1]
似乎是没有安装cmake
[iyunv@hadoop1 ~]# cd
[iyunv@hadoop1 ~]# wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz
[iyunv@hadoop1 ~]# tar zxvf cmake-2.8.12.2.tar.gz
[iyunv@hadoop1 ~]# cd cmake-2.8.12.2
[iyunv@hadoop1 ~]# ./configure
[iyunv@hadoop1 ~]# gmake
[iyunv@hadoop1 ~]# gmake install
安装好cmake后再来一次
[iyunv@hadoop1 ~]# cd
[iyunv@hadoop1 ~]# cd hadoop-2.2.0-src
[iyunv@hadoop1 hadoop-2.2.0-src]# mvn package -DskipTests -Pdist,native -Dtar
这次报了这么一个错
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (make) on project hadoop-hdfs: 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.
[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-hdfs
没看出什么个意思,再往上看,注意到了这一段
[exec] CMake Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
[exec] Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
[exec] Call Stack (most recent call first):
[exec] /usr/local/share/cmake-2.8/Modules/FindPkgConfig.cmake:102 (find_package_handle_standard_args)
[exec] main/native/fuse-dfs/CMakeLists.txt:23 (find_package)
错误:
[exec] CMake Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
[exec] Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
[exec] system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES
[exec] OPENSSL_INCLUDE_DIR)
[exec] Call Stack (most recent call first):
[exec] /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
[exec] /usr/local/share/cmake-2.8/Modules/FindOpenSSL.cmake:313 (find_package_handle_standard_args)
[exec] CMakeLists.txt:20 (find_package)
[exec]
[exec]
[exec] -- Configuring incomplete, errors occurred!
[exec] /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
[iyunv@hadoop1 ~]# yum install openssl
Loaded plugins: rhnplugin, securityThis system is not registered with ULN.ULN support will be disabled.
Setting up Install ProcessPackage openssl-0.9.8e-22.el5.x86_64 already installed and latest versionPackage openssl-0.9.8e-22.el5.i686 already installed and latest versionNothing to do