Spark Unable to load native-hadoop library for your platform Spark Unable to load native-hadoop library for your platform hadoop hadoop

Spark Unable to load native-hadoop library for your platform


Steps to fix:

  • download Hadoop binaries
  • unpack to directory of your choice
  • set HADOOP_HOME to point to that directory.
  • add $HADOOP_HOME/lib/native to LD_LIBRARY_PATH.


  1. Download hadoop binary (link) and put it in your home directory(you can choose a different hadoop version if you like and change the next steps accordingly)
  2. Unzip the folder in your home directory using the following command.tar -zxvf hadoop_file_name
  3. Now add export HADOOP_HOME=~/hadoop-2.8.0 to your .bashrc file. Open a new terminal and try again.

Source: Install PySpark on ubuntu