未解决的依赖关系:org.scala sbt#sbt;0.13:运行sbt 0.13时未找到?

未解决的依赖关系:org.scala sbt#sbt;0.13:运行sbt 0.13时未找到?,scala,sbt,Scala,Sbt,我有一个Scala项目,由几个项目组成。我决定开始使用sbt0.13。这里是~/sbt/repositories: [repositories] local sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[c

我有一个Scala项目,由几个项目组成。我决定开始使用sbt
0.13
。这里是
~/sbt/repositories

[repositories]
  local
  sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  maven-central: http://repo1.maven.org/maven2/
sbt.version=0.13.1
但我还是犯了一个错误:

Getting org.scala-sbt sbt 0.13 ...

:: problems summary ::
:::: WARNINGS
        module not found: org.scala-sbt#sbt;0.13

    ==== local: tried

      /home/alex/.ivy2/local/org.scala-sbt/sbt/0.13/ivys/ivy.xml

    ==== sbt-releases-repo: tried

      http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13/ivys/ivy.xml

    ==== sbt-plugins-repo: tried

      http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/0.13/ivys/ivy.xml

    ==== maven-central: tried

      http://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13/sbt-0.13.pom

        ::::::::::::::::::::::::::::::::::::::::::::::

        ::          UNRESOLVED DEPENDENCIES         ::

        ::::::::::::::::::::::::::::::::::::::::::::::

        :: org.scala-sbt#sbt;0.13: not found

        ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13: not found
Error during sbt execution: Error retrieving required libraries
  (see /home/alex/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13

如果删除此文件,则错误仍然存在。

尝试使用
0.13.1

将以下内容放入
项目/build.properties

[repositories]
  local
  sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  maven-central: http://repo1.maven.org/maven2/
sbt.version=0.13.1

您可能还需要
0.13
sbt启动器。请参见

您似乎遇到了版本不匹配问题

如果您修改了
项目/build.properties
以包含
sbt.version=0.13.0
,则可能意味着您使用了错误的启动器

试着跑步

sbt sbt-version

并在
project/build.properties

中检查版本是否与您的sbt版本匹配。我第一次在Ubuntu上安装openjdk-9-jdk,然后安装openjdk-8-jdk时遇到了相同的问题


最后我卸载了rm-rf和java,重新安装了openjdk-8-jdk,并运行了sudo update ca certificates-f,这为我解决了这个问题。

只有两个步骤

  • 使用更新证书

    $ update-ca-certificates -f
    
  • 进入

    $ sbt  
    

  • 如果连接到internet,它将获取必要的文件。

    我获取了,但我得到了另一个错误:
    [error]终端初始化失败;返回到不支持的java.lang.CompatibileClassChangeError:找到类jline.Terminal,但应为接口
    --
    检测到jline不兼容。检查sbt启动器是否为版本0.13.x或更高版本
    您所说的“我决定开始使用sbt 0.13”是什么意思?你下载了sbt 0.13吗?你的意思是~/.sbt/repositories而不是~/sbt/repositories吗?你如何更改你正在使用的启动器?这是唯一对我有用的东西。使用Ubuntu18.04并安装了OpenJDK8和11。我曾经卸载过Java。然后我又安装了open-jdk-8-jdk,就这样。答案真的属于这个问题吗?我没有看到任何与证书相关的内容。