开发者

scala-redis requires sbt 0.10.1 (other versions don't work) - is that normal?

开发者 https://www.devze.com 2023-04-07 17:46 出处:网络
While trying out the Scala bindings for Redis, I followed the instructions in the README file (clone the repo, cd into it, type sbt) and I got this:

While trying out the Scala bindings for Redis, I followed the instructions in the README file (clone the repo, cd into it, type sbt) and I got this:

$ sbt
Getting org.scala-tools.sbt sbt_2.9.1 0.10.1 ...

:: problems summary ::
:::: WARNINGS
    module not found: org.scala-tools.sbt#sbt_2.9.1;0.10.1

==== local: tried

  /Users/noah/.ivy2/local/org.scala-tools.sbt/sbt_2.9.1/0.10.1/ivys/ivy.xml

  -- artifact org.scala-tools.sbt#sbt_2.9.1;0.10.1!sbt_2.9.1.jar:

  /Users/noah/.ivy2/local/org.scala-tools.sbt/sbt_2.9.1/0.10.1/jars/sbt_2.9.1.jar

==== Maven2 Local: tried

  file:///Users/noah/.m2/repository/org/scala-tools/sbt/sbt_2.9.1/0.10.1/sbt_2.9.1-0.10.1.pom

  -- artifact org.scala-tools.sbt#sbt_2.9.1;0.10.1!sbt_2.9.1.jar:

  file:///Users/noah/.m2/repository/org/scala-tools/sbt/sbt_2.9.1/0.10.1/sbt_2.9.1-0.10.1.jar

==== typesafe-ivy-releases: tried

  http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt_2.9.1/0.10.1/ivys/ivy.xml

  -- artifact org.scala-tools.sbt#sbt_2.9.1;0.10.1!sbt_2.9.1.jar:

  http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt_2.9.1/0.10.1/jars/sbt_2.9.1.jar

==== Maven Central: tried

  http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt_2.9.1/0.10.1/sbt_2.9.1-0.10.1.pom

  -- artifact org.scala-tools.sbt#sbt_2.9.1;0.10.1!sbt_2.9.1.jar:

  http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt_2.9.1/0.10.1/sbt_2.9.1-0.10.1.jar

==== Scala-Tools Maven2 Repository: tried

  http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt_2.9.1/0.10.1/sbt_2.9.1-0.10.1.pom

  -- artifact org.scala-tools.sbt#sbt_2.9.1;0.10.1!sbt_2.9.1.jar:

  http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt_2.9.1/0.10.1/sbt_2.9.1-0.10.1.jar

==== Scala-Tools Maven2 Snapshots Repository: tried

  http://scala-tools.org/repo-snapshots/org/scala-tools/sbt/sbt_2.9.1/0.10.1/sbt_2.9.1-0.10.1.pom

  -- artifact org.scala-tools.sbt#sbt_2.9.1;0.10.1!sbt_2.9.1.jar:

  http://scala-tools.org/repo-snapshots/org/scala-tools/sbt/sbt_2.9.1/0.10.1/sbt_2.9.1-0.10.1.jar

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

    ::          UNRESOLVED DEPENDENCIES         ::


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

    :: org.scala-tools.sbt#sbt_2.9.1;0.10.1: not found

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



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

This was using sbt 0.7.4. I tried downloading the latest version of sbt (0.11.0) and I got the same problem. Then I manually downloaded sbt-launcher.jar from the 0.10.1 release of sbt, and that worked.

My question is: is sbt supposed to automatically download the required version of 开发者_StackOverflow中文版itself, or am I going to have to manually download & run different versions of sbt for packages which require different versions?


The error message seems unrelated to Redis.

Yes, SBT is supposed to download the appropriate version of itself. You can find out what versions of SBT are available by pointing your browser to: http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/ You will see that Scala 2.8.1 is tied to SBT versions <= 0.10.1, whereas Scala 2.9.1 is (currently) compatible with SBT 0.11.0 only.

You're getting this error message because somehow you're trying to get SBT 0.10.1 for Scala 2.9.1, which is an invalid combination. Not sure how you did this.. maybe you edited some internal SBT config files in the directory ~/.sbt/? If you want to get a "virgin" SBT, you can delete ~/.sbt/ and download the latest sbt-launch.jar. If you want to use a previous version of SBT, you can edit the project/build.properties file, as described on the Wiki.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号