在终端中运行sbt时,卡在“获取org.scala-sbt sbt 0.13.6 ......”

时间:2022-08-29 22:18:46

Similar problem with How to use sbt behind authenticated proxy?. I tried with the given answer and problem still there.

类似的问题如何在经过身份验证的代理服务器后面使用sbt?我尝试了给定的答案和问题仍在那里。

When I run sbt in 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?

我该怎么办呢?

8 个解决方案

#1


201  

This is quite old post and my answer may not be completely relevant. But here is my experience:

这是相当古老的帖子,我的回答可能不完全相关。但这是我的经验:

  1. I am using sbt 0.13.8
  2. 我正在使用sbt 0.13.8
  3. Getting org.scala-sbt sbt 0.13.8 ...
  4. 获得org.scala-sbt sbt 0.13.8 ...
  5. I have got this line hanging for some time - between 5 to 10 minutes.
  6. 我有这条线挂了一段时间 - 介于5到10分钟之间。
  7. And then it started to download stuff.
  8. 然后它开始下载东西。

So my solution is that you have to wait a bit.

所以我的解决方案是你必须等一下。

#2


29  

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选项也可以像其他人已经指出的那样工作。

#3


11  

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,这对于播放项目更容易。理论上并不十分清楚,因为我刚刚开始使用sbt。

#4


9  

It is downloading things, just use $ sbt -v, it will show logs.

它正在下载东西,只需使用$ sbt -v,它就会显示日志。

#5


8  

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在第一次运行时需要一些时间来下载它的罐子。这就是它似乎陷入困境的原因。下载完成后,它正常工作。

#6


2  

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.

这是一个相当晚的答案,但我在代理后面遇到了同样的问题。如果是这种情况,则应在运行sbt之前运行export JAVA_OPTS =“$ JAVA_OPTS -Dhttp.proxyHost = -Dhttp.proxyPort = ”。

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.

如果你仍然不确定它是否正在进行下载,你应该尝试使用verbose选项sbt -v启动sbt,如@ evan912所示。如果您遇到代理问题,在设置完成后,您应该会在控制台上看到一些[info]下载日志。

#7


1  

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"
  )

#8


-1  

try to use a fast maven mirror or run it behind a http/https proxy .

尝试使用快速maven镜像或在http / https代理后面运行它。

#1


201  

This is quite old post and my answer may not be completely relevant. But here is my experience:

这是相当古老的帖子,我的回答可能不完全相关。但这是我的经验:

  1. I am using sbt 0.13.8
  2. 我正在使用sbt 0.13.8
  3. Getting org.scala-sbt sbt 0.13.8 ...
  4. 获得org.scala-sbt sbt 0.13.8 ...
  5. I have got this line hanging for some time - between 5 to 10 minutes.
  6. 我有这条线挂了一段时间 - 介于5到10分钟之间。
  7. And then it started to download stuff.
  8. 然后它开始下载东西。

So my solution is that you have to wait a bit.

所以我的解决方案是你必须等一下。

#2


29  

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选项也可以像其他人已经指出的那样工作。

#3


11  

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,这对于播放项目更容易。理论上并不十分清楚,因为我刚刚开始使用sbt。

#4


9  

It is downloading things, just use $ sbt -v, it will show logs.

它正在下载东西,只需使用$ sbt -v,它就会显示日志。

#5


8  

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在第一次运行时需要一些时间来下载它的罐子。这就是它似乎陷入困境的原因。下载完成后,它正常工作。

#6


2  

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.

这是一个相当晚的答案,但我在代理后面遇到了同样的问题。如果是这种情况,则应在运行sbt之前运行export JAVA_OPTS =“$ JAVA_OPTS -Dhttp.proxyHost = -Dhttp.proxyPort = ”。

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.

如果你仍然不确定它是否正在进行下载,你应该尝试使用verbose选项sbt -v启动sbt,如@ evan912所示。如果您遇到代理问题,在设置完成后,您应该会在控制台上看到一些[info]下载日志。

#7


1  

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"
  )

#8


-1  

try to use a fast maven mirror or run it behind a http/https proxy .

尝试使用快速maven镜像或在http / https代理后面运行它。