【问题标题】:Sbt dependency error with Spark Catalyst and Scala parser librarySpark Catalyst 和 Scala 解析器库的 Sbt 依赖错误
【发布时间】:2022-08-05 19:51:40
【问题描述】:

最近开始学习和使用 Spark 和 Scala。遇到以下依赖冲突问题

斯卡拉版本: 2.13.8

SBT版本: 1.6.2

需要 Spark 版本: 3.2.1

[error] (update) found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error] 
[error]         * org.scala-lang.modules:scala-parser-combinators_2.13:2.1.1 (early-semver) is selected over 1.1.2
[error]             +- ch.epfl.scala:hello-world_2.13:1.0                 (depends on 2.1.1)
[error]             +- org.apache.spark:spark-catalyst_2.13:3.2.1         (depends on 1.1.2)
[error] 

    标签: scala apache-spark intellij-idea sbt


    【解决方案1】:
    
    libraryDependencies += "org.apache.spark" %% "spark-sql" % "3.3.0"
    ... other libraries ...
    
    dependencyOverrides += "org.scala-lang.modules" %% "scala-parser-combinators" % "2.1.1"
    
    

    在你的 build.sbt 文件中添加这个 dependencyOverrides

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-11-02
      • 1970-01-01
      • 2015-12-19
      • 2019-12-22
      • 2017-11-05
      • 2018-04-10
      • 2019-09-30
      相关资源
      最近更新 更多