当前位置: 首页 > 知识库问答 >
问题:

sbt无法下载组件

陆宇航
2023-03-14

因此,我使用.的说明在Ubuntu上安装了sbt,但当我在终端执行sbt时,我会出现错误,下载失败,因为“找不到可信的证书”。我做的不多,所以我不确定我做错了什么。

完整输出如下:

parallels@ubuntu:~$ sbt
Getting org.scala-sbt sbt 0.13.13 ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main/0.13.13/jars/main.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.13/jars/compiler-interface.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/actions/0.13.13/jars/actions.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main-settings/0.13.13/jars/main-settings.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.13.13/jars/io.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/ivy/0.13.13/jars/ivy.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.13.13/jars/command.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.13.13/jars/completion.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/api/0.13.13/jars/api.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.13.13/jars/collections.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/incremental-compiler/0.13.13/jars/incremental-compiler.jar ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.13/jars/compile.jar ...

:: problems summary ::
:::: WARNINGS
        [FAILED     ] org.scala-sbt#main;0.13.13!main.jar: sun.security.validator.ValidatorException: No trusted certificate found (16019ms)

        [FAILED     ] org.scala-sbt#main;0.13.13!main.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/main/0.13.13/jars/main.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/main/0.13.13/main-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main/0.13.13/jars/main.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/main/0.13.13/jars/main.jar

        [FAILED     ] org.scala-sbt#compiler-interface;0.13.13!compiler-interface.jar: sun.security.validator.ValidatorException: No trusted certificate found (754ms)

        [FAILED     ] org.scala-sbt#compiler-interface;0.13.13!compiler-interface.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/compiler-interface/0.13.13/jars/compiler-interface.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/compiler-interface/0.13.13/compiler-interface-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.13/jars/compiler-interface.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/compiler-interface/0.13.13/jars/compiler-interface.jar

        [FAILED     ] org.scala-sbt#actions;0.13.13!actions.jar: sun.security.validator.ValidatorException: No trusted certificate found (763ms)

        [FAILED     ] org.scala-sbt#actions;0.13.13!actions.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/actions/0.13.13/jars/actions.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/actions/0.13.13/actions-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/actions/0.13.13/jars/actions.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/actions/0.13.13/jars/actions.jar

        [FAILED     ] org.scala-sbt#main-settings;0.13.13!main-settings.jar: sun.security.validator.ValidatorException: No trusted certificate found (789ms)

        [FAILED     ] org.scala-sbt#main-settings;0.13.13!main-settings.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/main-settings/0.13.13/jars/main-settings.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/main-settings/0.13.13/main-settings-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main-settings/0.13.13/jars/main-settings.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/main-settings/0.13.13/jars/main-settings.jar

        [FAILED     ] org.scala-sbt#io;0.13.13!io.jar: sun.security.validator.ValidatorException: No trusted certificate found (766ms)

        [FAILED     ] org.scala-sbt#io;0.13.13!io.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/io/0.13.13/jars/io.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/io/0.13.13/io-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.13.13/jars/io.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/io/0.13.13/jars/io.jar

        [FAILED     ] org.scala-sbt#ivy;0.13.13!ivy.jar: sun.security.validator.ValidatorException: No trusted certificate found (770ms)

        [FAILED     ] org.scala-sbt#ivy;0.13.13!ivy.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/ivy/0.13.13/jars/ivy.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/ivy/0.13.13/ivy-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/ivy/0.13.13/jars/ivy.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/ivy/0.13.13/jars/ivy.jar

        [FAILED     ] org.scala-sbt#command;0.13.13!command.jar: sun.security.validator.ValidatorException: No trusted certificate found (712ms)

        [FAILED     ] org.scala-sbt#command;0.13.13!command.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/command/0.13.13/jars/command.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/command/0.13.13/command-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.13.13/jars/command.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/command/0.13.13/jars/command.jar

        [FAILED     ] org.scala-sbt#completion;0.13.13!completion.jar: sun.security.validator.ValidatorException: No trusted certificate found (705ms)

        [FAILED     ] org.scala-sbt#completion;0.13.13!completion.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/completion/0.13.13/jars/completion.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/completion/0.13.13/completion-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.13.13/jars/completion.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/completion/0.13.13/jars/completion.jar

        [FAILED     ] org.scala-sbt#api;0.13.13!api.jar: sun.security.validator.ValidatorException: No trusted certificate found (769ms)

        [FAILED     ] org.scala-sbt#api;0.13.13!api.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/api/0.13.13/jars/api.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/api/0.13.13/api-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/api/0.13.13/jars/api.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/api/0.13.13/jars/api.jar

        [FAILED     ] org.scala-sbt#collections;0.13.13!collections.jar: sun.security.validator.ValidatorException: No trusted certificate found (703ms)

        [FAILED     ] org.scala-sbt#collections;0.13.13!collections.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/collections/0.13.13/jars/collections.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/collections/0.13.13/collections-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.13.13/jars/collections.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/collections/0.13.13/jars/collections.jar

        [FAILED     ] org.scala-sbt#incremental-compiler;0.13.13!incremental-compiler.jar: sun.security.validator.ValidatorException: No trusted certificate found (721ms)

        [FAILED     ] org.scala-sbt#incremental-compiler;0.13.13!incremental-compiler.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/incremental-compiler/0.13.13/jars/incremental-compiler.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/incremental-compiler/0.13.13/incremental-compiler-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/incremental-compiler/0.13.13/jars/incremental-compiler.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/incremental-compiler/0.13.13/jars/incremental-compiler.jar

        [FAILED     ] org.scala-sbt#compile;0.13.13!compile.jar: sun.security.validator.ValidatorException: No trusted certificate found (817ms)

        [FAILED     ] org.scala-sbt#compile;0.13.13!compile.jar:  (0ms)

    ==== local: tried

      /home/parallels/.ivy2/local/org.scala-sbt/compile/0.13.13/jars/compile.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/compile/0.13.13/compile-0.13.13.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.13/jars/compile.jar

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/compile/0.13.13/jars/compile.jar

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

        ::              FAILED DOWNLOADS            ::

        :: ^ see resolution messages for details  ^ ::

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

        :: org.scala-sbt#main;0.13.13!main.jar

        :: org.scala-sbt#actions;0.13.13!actions.jar

        :: org.scala-sbt#io;0.13.13!io.jar

        :: org.scala-sbt#completion;0.13.13!completion.jar

        :: org.scala-sbt#collections;0.13.13!collections.jar

        :: org.scala-sbt#api;0.13.13!api.jar

        :: org.scala-sbt#incremental-compiler;0.13.13!incremental-compiler.jar

        :: org.scala-sbt#compile;0.13.13!compile.jar

        :: org.scala-sbt#ivy;0.13.13!ivy.jar

        :: org.scala-sbt#main-settings;0.13.13!main-settings.jar

        :: org.scala-sbt#command;0.13.13!command.jar

        :: org.scala-sbt#compiler-interface;0.13.13!compiler-interface.jar

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



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
download failed: org.scala-sbt#main;0.13.13!main.jar
download failed: org.scala-sbt#actions;0.13.13!actions.jar
download failed: org.scala-sbt#io;0.13.13!io.jar
download failed: org.scala-sbt#completion;0.13.13!completion.jar
download failed: org.scala-sbt#collections;0.13.13!collections.jar
download failed: org.scala-sbt#api;0.13.13!api.jar
download failed: org.scala-sbt#incremental-compiler;0.13.13!incremental-compiler.jar
download failed: org.scala-sbt#compile;0.13.13!compile.jar
download failed: org.scala-sbt#ivy;0.13.13!ivy.jar
download failed: org.scala-sbt#main-settings;0.13.13!main-settings.jar
download failed: org.scala-sbt#command;0.13.13!command.jar
download failed: org.scala-sbt#compiler-interface;0.13.13!compiler-interface.jar
Error during sbt execution: Error retrieving required libraries
  (see /home/parallels/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.13

共有1个答案

孙辰阳
2023-03-14

在自己在Ubuntu上安装sbt时遇到这个问题后,我找到了解决方案。我相信我们有相同的错误,所以这应该可以解决它。我提供了从头到尾在Ubuntu上下载和安装sbt的步骤。如果只想修复错误,请从步骤4开始。

在终端中键入以下命令。请注意,如果您访问www.scala-sbt.org/download.html可以找到这些命令。

echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
sudo apt-get update
sudo apt-get install sbt

2)现在在终端中键入sbt,它应该安装一些.jar文件,并给您一个REPL('>'符号)。

2.1)如果成功,请在“>”号后面键入console并按enter键

如果键入sbt后出现错误,请继续。如果你没有错误,恭喜你!您安装了Scala和SBT!

3)如果在步骤2中键入sbt会产生与下图类似的错误,则转到步骤4。

4)您需要将默认JDK版本更改为8,如下载时的堆栈溢出答案此处异常:sun.security.validator.validatoreXception:找不到受信任的证书

注意:如果路径中没有java-8选项,那么应该可以下载JDK8,然后返回到步骤4.1将其设置为默认JDK。

5)然后再次运行sbt,它应该可以工作!

 类似资料:
  • 在unix shell中尝试以下操作: https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.7/jars/precompiled-2_8_2.jar https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/prec

  • 我该怎么办?< br >它不下载,只是不断重复这个过程!

  • 使用Windows7,64bit,在代理服务器后面。 我已经下载并安装了SBT(0.13.11)、Scala(2.11.8)和IntelliJ IDEA社区(2016.1.2)的最新版本。当我尝试在IntelliJ中启动一个新项目时,我可以使用的SBT的最新版本是0.13.8,而不是0.13.11。有人知道为什么会这样吗?如果我尝试启动一个新项目,我会得到一个错误: 错误:导入SBT项目时出错:

  • 无法完成安装,因为找不到一个或多个必需的项目。 正在安装的软件:TestNG M2E(Maven)Integration(可选)6.13.0.201712040650(org.TestNG.eclipse.Maven.feature.feature.group 6.13.0.201712040650)缺少要求:TestNG M2E(Maven)Integration 6.13.0.20171204

  • 我也尝试过“无法找到com.android.tools.build:aapt2:3.2.0”,但它不起作用。 请帮忙...

  • 我试图从url下载图像,但得到了java。木卫一。IOException:异常。我的代码是: 当运行投掷: 这段代码适用于某些URL,但对于这一点,我不明白为什么不能。非常感谢。