Reputation: 1748
I am trying to install Spark on Ubuntu 12.04 on a Virtual Machine.
I followed the instructions at http://www.tutorialspoint.com/apache_spark/apache_spark_installation.htm
I have java version "1.6.0_38" and scala version "2.9.1",
I downloaded spark and moved it to the location /usr/local/spark
and on trying to start the spark shell I get the following error:
arj@arj-VirtualBox:/usr/local/spark/bin$ ./spark-shell
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/launcher/Main
Caused by: java.lang.ClassNotFoundException: org.apache.spark.launcher.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.apache.spark.launcher.Main. Program will exit.
I am not sure what is going wrong.
Upvotes: 2
Views: 1019
Reputation: 1748
Most probably I downloaded an incompatible version, so something similar.
Finally after hitting a deadend I looked for another method of installing Spark.
I came across this tutorial which explains how to build spark from its source http://blog.prabeeshk.com/blog/2014/10/31/install-apache-spark-on-ubuntu-14-dot-04/
This worked like a charm.
Upvotes: 1