Originally through the Brew installed Hadoop 2.6.0, but the use of the process to report an error (Error description), check the information is because of the native library problem, looked at, found that through the brew installed version at all there is no native directory, so download the source code itself compiled. The result has been a lot of problems, recorded as follows:
1. Error: Package Com.sun.javadoc does not exist
This error attempts a number of methods, including specifying the Tools.jar file in Pom.xml, etc.
Finally, the ' Export java_home=/usr/libexec/java_home-v 1.6 ' command toggles the JDK version to 1.6 (the latest version of 1.8.x installed on OS x) is resolved
2.[error] Failed to execute goal Org.apache.hadoop:hadoop-maven-plugins:2.6.0:protoc (COMPILE-PROTOC) on project Hadoop-common:org.apache.maven.plugin.mojoexecutionexception: ' Protoc--version ' did not return a version---[Help 1]
Check the data that is missing PROTOBUF library, after the brew installation, the result is required to compile the 2.5.0 version, but brew installed is version 2.6.1, so had to uninstall, and then manually download version 2.5.0 (https:// protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz), and then compile your own installation
$ sudo./configure
$ sudo make
$ sudo make check
$ sudo make install
$ sudo ldconfig
$ PROTOC--version
3.[error] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project Hadoop-common: An Ant buildexception have occured:execute failed:java.io.IOException:Cannot run program ' CMake ' (in directory/usr/loc Al/cellar/hadoop/hadoop-2.6.0-src/hadoop-common-project/hadoop-common/target/native "): error=2, No such file or Directory
Install CMake via brew install CMake
4.[error] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project Hadoop-common: An Ant buildexception have occured:exec returned:1
Go ahead and see
Main
[EXEC]--configuring incomplete, Errors occurred!
[EXEC] See also "/usr/local/cellar/hadoop/hadoop-2.6.0-src/hadoop-common-project/hadoop-comcmake Error at/usr/local/ cellar/cmake/3.1.0/share/cmake/modules/findpackagehandlestandardargs.cmake:138 (message):
[EXEC] Could not Mon/target/native/cmakefiles/cmakeoutput.log ".
[EXEC] Find JNI (missing:java_awt_library java_jvm_library
[EXEC] Java_include_path java_include_path2 Java_awt_include_path)
[EXEC] Call Stack (most recent call first):
[EXEC]/usr/local/cellar/cmake/3.1.0/share/cmake/modules/findpackagehandlestandardargs.cmake:374 (_FPHSA_FAILURE _message)
[EXEC]/usr/local/cellar/cmake/3.1.0/share/cmake/modules/findjni.cmake:286 (Find_package_handle_standard_args)
[EXEC] Jniflags.cmake:123 (Find_package)
[EXEC] Cmakelists.txt:24 (include)
After the discovery is mainly because CMake did not find the jni.h file, another look, in the $java_home directory there is no include directory, the Mac comes with the jdk1.6 seems to have a problem, so downloaded JDK 1.7, and re-export java_home
5. Hint Tools.jar error
Under $java_home mkdir classes, then ln-s. /lib/tools.jar Classes.jar
Mac OS X 10.10 compiling Hadoop 2.6.0 notes