title: Hadoop native libraries not found on OS/X
body: <p>I have downloaded <code>hadoop</code> source code from github and compiled with the <code>native</code> option:</p>
  
  <pre><code>mvn package -Pdist,native -DskipTests -Dtar -Dmaven.javadoc.skip=true
  </code></pre>
  
  <p>I then  copied the  <code>.dylib</code> files to the $HADOOP_HOME/lib </p>
  
  <pre><code>cp -p hadoop-common-project/hadoop-common/target/hadoop-common-2.7.1/lib/native/*.dylib /usr/local/Cellar/hadoop/2.7.2/libexec/share/hadoop/lib
  </code></pre>
  
  <p>The LD_LIBRARY_PATH was updated and hdfs restarted:</p>
  
  <pre><code> echo $LD_LIBRARY_PATH
   /usr/local/Cellar/hadoop/2.7.2/libexec/lib:
   /usr/local/Cellar/hadoop/2.7.2/libexec/share/hadoop/common/lib:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home//jre/lib
  </code></pre>
  
  <p>(Note: this also means that the answer to <a href="https://stackoverflow.com/questions/30369380/hadoop-unable-to-load-native-hadoop-library-for-your-platform-error-on-docker">Hadoop “Unable to load native-hadoop library for your platform” error on docker-spark?</a> does not work for me..)</p>
  
  <p>But <code>checknative</code> still returns uniformly <code>false</code>:</p>
  
  <pre><code>$stop-dfs.sh &amp;&amp; start-dfs.sh &amp;&amp; hadoop checknative
  16/06/13 16:12:32 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  Stopping namenodes on [sparkbook]
  sparkbook: stopping namenode
  localhost: stopping datanode
  Stopping secondary namenodes [0.0.0.0]
  0.0.0.0: stopping secondarynamenode
  16/06/13 16:12:50 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  16/06/13 16:12:50 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  Starting namenodes on [sparkbook]
  sparkbook: starting namenode, logging to /usr/local/Cellar/hadoop/2.7.2/libexec/logs/hadoop-macuser-namenode-sparkbook.out
  localhost: starting datanode, logging to /usr/local/Cellar/hadoop/2.7.2/libexec/logs/hadoop-macuser-datanode-sparkbook.out
  Starting secondary namenodes [0.0.0.0]
  0.0.0.0: starting secondarynamenode, logging to /usr/local/Cellar/hadoop/2.7.2/libexec/logs/hadoop-macuser-secondarynamenode-sparkbook.out
  16/06/13 16:13:05 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  16/06/13 16:13:05 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  Native library checking:
  hadoop:  false
  zlib:    false
  snappy:  false
  lz4:     false
  bzip2:   false
  openssl: false
  </code></pre>