报错:
hadoop@ubuntu:~/sparkapp$ sbt package
[warn] No sbt.version set in project/build.properties, base directory: /home/hadoop/sparkapp
[error] [/home/hadoop/.sbt/1.0/staging/b68873cfb914bf8f952b/sparkapp/simple.sbt]:4: illegal character '\u201c'
[error] [/home/hadoop/.sbt/1.0/staging/b68873cfb914bf8f952b/sparkapp/simple.sbt]:4: ';' expected but something found.
[error] [/home/hadoop/.sbt/1.0/staging/b68873cfb914bf8f952b/sparkapp/simple.sbt]:4: unclosed string literal
实验做的好好的,就是报这个错误。
去官网的spark看了SimpleApp.scala 没有错误
正确构建了 build.sbt
错误原因是第一个error的文件中有一个引号自己变成中文引号了。
我的build.sbt中为
hadoop@ubuntu:~/sparkapp$ cat build.sbt
name := "Simple Project"
version := "1.0"
scalaVersion := "2.11.12"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.4.0"
但是error的文件中最后一个左引号为
name := "Simple Project"
version := "1.0"
scalaVersion := "2.11.12"
libraryDependencies += "org.apache.spark" %% "spark-sql" % “2.4.0"