Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Could not find or load main class org.apache.spark.launcher.Main [duplicate]

Tags:

apache-spark

It would be really appreciated if anyone can help sort it out the following path issue for me? I highly doubt this is related to missing path setting but don't know how can I fix it.

rxie@ubuntu:~/Downloads/spark$ echo $PATH
/usr/bin/java:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/rxie/Downloads/s                                                                                  park:/home/rxie/Downloads/spark/bin:/usr/bin/java
rxie@ubuntu:~/Downloads/spark$ pyspark

Error: Could not find or load main class org.apache.spark.launcher.Main

rxie@ubuntu:~/Downloads/spark$ spark-shell

Error: Could not find or load main class org.apache.spark.launcher.Main

rxie@ubuntu:~/Downloads/spark$ pwd /home/rxie/Downloads/spark

rxie@ubuntu:~/Downloads/spark$ ls
bin  conf  data  examples  jars  kubernetes  licenses  R  yarn

Updated with the PATH:

rxie@ubuntu:~$ echo $PATH
/home/rxie/Downloads/spark:/usr/bin/java:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
like image 390
Choix Avatar asked Jun 17 '18 12:06

Choix


1 Answers

Try setting SPARK_HOME environment variable to ~/Downloads/spark

like image 192
Devstr Avatar answered Oct 11 '22 05:10

Devstr