启动spark-shell提示scala版本不一致的解决

spark版本:1.3.1

scala版本:2.10.5

前段时间为了折腾scala IDE环境,对配置文件进行了折腾,最后不知道修改了哪个配置,今天想启动spark-shell发现提示错误,错误信息如下:

error: 
     while compiling:
        during phase: namer
     library version: version 2.10.4
    compiler version: version 2.10.5
  reconstructed args: 


  last tree to typer: EmptyTree
              symbol: null
   symbol definition: null
                 tpe:
       symbol owners: 
      context owners: package


== Enclosing template or block ==

从上面的信息来看是因为库的版本和编译版本不一致导致,于是查看scala的版本,发现版本是2.10.5,于是到处找spark配置文件看哪里有配置library版本

最后发现是在profile文件里新加了一个scala-library.jar的classpath,于是把这个路径删掉,source profile更新

重新启动 spark-shell,成功!

教训:以后进行配置尝试还是要进行备份

你可能感兴趣的:(云计算)