报错信息是:Error: Could not find or load main class org.apache.spark.launcher.Main
spark环境说明:(SPARK_HOME环境变量中我尝试了自己编译的和网上下载的,都报同一个错误)
spark-2.1.0-bin-2.6.0-cdh5.7.0 这个包是从网上下载的,
spark-2.4.3-bin-hadoop-2.6.0-cdh5.7.0 这个是我自己编译源码的:
编译命令:(最后能编译成功)
./dev/make-distribution.sh --name hadoop-2.6.0-cdh5.7.0 --tgz -Pyarn -Phadoop-2.6 -Phive -Phive-thriftserver -Dhadoop.version=2.6.0-cdh5.7.0
以下是我的环境变量配置信息:
export SPARK_HOME=/home/hadoop/app/spark-2.1.0-bin-2.6.0-cdh5.7.0
export PATH=$SPARK_HOME/bin:$PATH
export JAVA_HOME=/home/hadoop/app/jdk1.8.0_201
export PATH=$JAVA_HOME/bin:$PATH
export MAVEN_HOME=/home/hadoop/app/apache-maven-3.6.1
export PATH=$MAVEN_HOME/bin:$PATH
export HADOOP_HOME=/home/hadoop/app/hadoop-2.6.0-cdh5.7.0
export PATH=$HADOOP_HOME/bin:$PATH
export HIVE_HOME=/home/hadoop/app/hive-1.1.0-cdh5.7.0
export PATH=$HIVE_HOME/bin:$PATH
export SCALA_HOME=/home/hadoop/app/scala-2.11.8
export PATH=$SCALA_HOME/bin:$PATH