sbt 命令返回错误

sbt 命令返回错误

我正在尝试在 ubuntu 16.04 上使用 SBT。

这是我得到的:

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/main/0.13.12/jars/main.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/compiler-interface/0.13.12/jars/compiler-interface.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/actions/0.13.12/jars/actions.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/main-settings/0.13.12/jars/main-settings.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/io/0.13.12/jars/io.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/ivy/0.13.12/jars/ivy.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/command/0.13.12/jars/command.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/completion/0.13.12/jars/completion.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/api/0.13.12/jars/api.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/collections/0.13.12/jars/collections.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/incremental-compiler/0.13.12/jars/incremental-compiler.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

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

    ==== local: tried

      /home/luca/.ivy2/local/org.scala-sbt/compile/0.13.12/jars/compile.jar

    ==== Maven Central: tried

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

    ==== typesafe-ivy-releases: tried

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

    ==== sbt-ivy-snapshots: tried

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

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

        ::              FAILED DOWNLOADS            ::

        :: ^ see resolution messages for details  ^ ::

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

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

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

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

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

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

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

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

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

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

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

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

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

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



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

答案1

我发现了同样的问题,并找到了答案在 StackOverflow 上

在 Ubuntu 16 上新安装的 sbt 会安装 Java 9,但 Java 9 和 sbt 的依赖库之间的证书有些奇怪。卸载 Java 9(这将卸载 sbt),手动安装 Java 8,然后再次安装 sbt,它不应该这样做。链接中有更好的说明。

这对我有用:

sudo apt-get remove openjdk-9-*
sudo apt-get install openjdk-8-jdk 
sudo apt-get install sbt

相关内容