scala 为什么 sbt 报告“错误:无法检索 sbt 0.13.11”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37613421/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why does sbt report "Error: Could not retrieve sbt 0.13.11"?
提问by Joost den Boer
In a Scala project I updated the build.propertiesfrom 0.13.8to 0.13.11. That "broke" sbt as it does not start anymore, i.e. it cannot download the 0.13.11 jars?! sbt prints a list of tried repo's, but the repo.typesafe.comwas not one of them.
在Scala的项目中,我更新了build.properties从0.13.8至0.13.11。那个“破坏”了 sbt,因为它不再启动,即它无法下载 0.13.11 jars?!sbt 打印了一个尝试过的 repo 的列表,但repo.typesafe.com不是其中之一。
My local installed sbt is 0.13.8.
我本地安装的 sbt 是0.13.8。
For some reason the scala-sbtjars are not available anymore in Typesafe's Bintray. Largest version there is 0.13.9.
出于某种原因,这些scala-sbt罐子在 Typesafe 的 Bintray 中不再可用。最大的版本是 0.13.9。
I know the place to get it is https://repo.typesafe.com/typesafe/ivy-releases/, but how do I tell sbt to use this repo?
我知道获取它的地方是https://repo.typesafe.com/typesafe/ivy-releases/,但是我如何告诉 sbt 使用这个 repo?
I have already tried:
我已经尝试过:
- adding a resolver to
plugins.sbt - adding a resolver to
build.sbt - adding the repo to
.sbt/repositories
- 添加解析器
plugins.sbt - 添加解析器
build.sbt - 将回购添加到
.sbt/repositories
but I cannot get it working.
但我无法让它工作。
How to tell sbt where to get binaries?
如何告诉 sbt 在哪里获取二进制文件?
回答by Jacek Laskowski
Make sure that you're using sbt (launcher) that's at the same version of higher than the version used in your project.
Execute
sbt aboutin an empty directory and find[info] This is sbt X.Y.X.Make sure that you don't use
~/.sbt/repositoriesfile that sets up the repositories used to resolve artifacts.
确保您使用的 sbt(启动器)版本高于项目中使用的版本。
sbt about在空目录中执行并找到[info] This is sbt X.Y.X.确保您不使用
~/.sbt/repositories设置用于解析工件的存储库的文件。
回答by Det
try to set your https proxy Information into http.proxyHost and http.proxyPort. This solved it for me.
尝试将您的 https 代理信息设置为 http.proxyHost 和 http.proxyPort。这为我解决了。

