Java 在终端中运行 sbt 时卡在“Getting org.scala-sbt sbt 0.13.6 ...”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29599309/
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
stuck at "Getting org.scala-sbt sbt 0.13.6 ..." when running sbt in terminal
提问by HappyCoding
Similar problem with How to use sbt behind authenticated proxy?. I tried with the given answer and problem still there.
与如何在经过身份验证的代理后面使用 sbt 的类似问题?. 我尝试了给定的答案,但问题仍然存在。
When I run sbtin terminal, it shows and stucks at :
当我在终端中运行sbt时,它显示并停留在:
Getting org.scala-sbt sbt 0.13.6 ...
additional information:
附加信息:
sbt --version
sbt launcher version 0.13.6
How could I fix it?
我怎么能修好呢?
回答by HappyCoding
I bypassed the error by adding a build.properties file under project folder, in which, I put:
我通过在项目文件夹下添加一个 build.properties 文件来绕过错误,我在其中放置:
sbt.version=0.13.5
I think this probably is because my system has activator pre-installed instead of sbt, which is easier to work with play project. Not quite clear in the theory as I just start to use sbt.
我想这可能是因为我的系统预装了激活器而不是 sbt,这更容易与 play 项目一起使用。理论上不太清楚,因为我刚开始使用 sbt。
回答by Jerome Anthony
Creating a build.sbt file worked as well. My build.sbt file looks like below;
创建 build.sbt 文件也有效。我的 build.sbt 文件如下所示;
lazy val root = (project in file(".")).
settings(
name := "hello",
version := "1.0",
scalaVersion := "2.11.4"
)
回答by Hakobyan Vahe
This is quite old post and my answer may not be completely relevant. But here is my experience:
这是一篇很老的帖子,我的回答可能并不完全相关。但这是我的经验:
- I am using sbt 0.13.8
- Getting org.scala-sbt sbt 0.13.8 ...
- I have got this line hanging for some time - between 5 to 10 minutes.
- And then it started to download stuff.
- 我正在使用 sbt 0.13.8
- 获取 org.scala-sbt sbt 0.13.8 ...
- 我把这条线挂了一段时间 - 在 5 到 10 分钟之间。
- 然后它开始下载东西。
So my solution is that you have to wait a bit.
所以我的解决方案是你必须等待一段时间。
回答by Rohan
I think sbt takes some time to download its jars when it is run first time. That is why it seems to be stuck. It works normal after the download is completed.
我认为 sbt 在第一次运行时需要一些时间来下载它的 jars。这就是为什么它似乎被卡住了。下载完成后即可正常使用。
回答by Thava
There is an update log ...
有更新日志...
$ tail -f $HOME/.sbt/boot/update.log
Execute the above command in another terminal to see the progress. Using -v option works as others already indicated as well.
在另一个终端执行上面的命令查看进度。使用 -v 选项也可以像其他人已经指出的那样工作。
回答by maroon912
It is downloading things, just use $ sbt -v
, it will show logs.
它正在下载东西,只需使用$ sbt -v
,它就会显示日志。
回答by Andrea
It's quite a late answer, but I encountered the same problem working behind a proxy. If this is your case, you should run export JAVA_OPTS="$JAVA_OPTS
-Dhttp.proxyHost=<your-proxy> -Dhttp.proxyPort=<your-proxy-port>"
before running sbt
.
这是一个很晚的答案,但我在代理后面工作时遇到了同样的问题。如果是这种情况,您应该在运行export JAVA_OPTS="$JAVA_OPTS
-Dhttp.proxyHost=<your-proxy> -Dhttp.proxyPort=<your-proxy-port>"
之前运行sbt
。
If you are still unsure if it's going ahead with the downloading, you should try launching sbt
with the verbose option sbt -v
, as suggested by @evan912. If you had a problem with the proxy, after setting it you should see some [info] downloading
logging on your console.
如果您仍然不确定下载是否继续进行,您应该按照@evan912 的建议尝试sbt
使用详细选项启动sbt -v
。如果代理有问题,在设置后,您应该会[info] downloading
在控制台上看到一些日志记录。
回答by Hyman long
try to use a fast maven mirror or run it behind a http/https proxy .
尝试使用快速 maven 镜像或在 http/https 代理后面运行它。