如何修复“InvalidAlgorithmParameterException:trustAnchors参数必须为非空”"在scala的构建工具(sbt)? [英] How to fix "InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty" in scala's build tool (sbt)?

查看:177
本文介绍了如何修复“InvalidAlgorithmParameterException:trustAnchors参数必须为非空”"在scala的构建工具(sbt)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新安装的Ubuntu 17.10上,我安装了 scala构建工具(sbt)根据文档

On a fresh Ubuntu 17.10 installation, I installed scala build tool (sbt) according to the docs:

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

然而当运行sbt时,要么只是要获得其版本或构建项目,我收到此错误:

Yet when running sbt, either just to get its version or to build a project, I get this error:

Getting org.scala-sbt sbt 1.1.0  (this may take some time)...

:: problems summary ::
:::: WARNINGS
        module not found: org.scala-sbt#sbt;1.1.0

    ==== local: tried

      /home/philipp/.ivy2/local/org.scala-sbt/sbt/1.1.0/ivys/ivy.xml

      -- artifact org.scala-sbt#sbt;1.1.0!sbt.jar:

      /home/philipp/.ivy2/local/org.scala-sbt/sbt/1.1.0/jars/sbt.jar

    ==== local-preloaded-ivy: tried

      file:////home/philipp/.sbt/preloaded/org.scala-sbt/sbt/1.1.0/ivys/ivy.xml

    ==== local-preloaded: tried

      file:////home/philipp/.sbt/preloaded/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.pom

      -- artifact org.scala-sbt#sbt;1.1.0!sbt.jar:

      file:////home/philipp/.sbt/preloaded/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.jar

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.pom

      -- artifact org.scala-sbt#sbt;1.1.0!sbt.jar:

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

    ==== sbt-maven-releases: tried

      https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.pom

      -- artifact org.scala-sbt#sbt;1.1.0!sbt.jar:

      https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.jar

    ==== sbt-maven-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.pom

      -- artifact org.scala-sbt#sbt;1.1.0!sbt.jar:

      https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.jar

    ==== typesafe-ivy-releases: tried

      https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.1.0/ivys/ivy.xml

    ==== sbt-ivy-snapshots: tried

      https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/1.1.0/ivys/ivy.xml

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

        ::          UNRESOLVED DEPENDENCIES         ::

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

        :: org.scala-sbt#sbt;1.1.0: not found

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


:::: ERRORS
    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.pom

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.jar

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.pom

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.jar

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.pom

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.1.0/sbt-1.1.0.jar

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.1.0/ivys/ivy.xml

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/1.1.0/ivys/ivy.xml


:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;1.1.0: not found
Error during sbt execution: Error retrieving required libraries
  (see /home/philipp/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 1.1.0

这是我的Java版本:

This is my Java version:

$ java --version
openjdk 9-Ubuntu
OpenJDK Runtime Environment (build 9-Ubuntu+0-9b181-4)
OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b181-4, mixed mode)

我不知道发生了什么。如何让sbt启动并再次运行?

I have no idea what is happening. How to get sbt up and running again?

推荐答案

在我的案例中,Ubuntu 18.04 bionic和sbt 1.1.6,强制重新安装 ca-certificates-java 将问题解决为解决方法。

In my case on Ubuntu 18.04 bionic and sbt 1.1.6, forcing to reinstall ca-certificates-java fixes the problem as a workaround.

sudo dpkg --purge --force-depends ca-certificates-java
sudo apt install ca-certificates-java

请注意 - force-depends 选项不会损坏您的安装。

Be careful that --force-depends option doesn't damage your installation.

这篇关于如何修复“InvalidAlgorithmParameterException:trustAnchors参数必须为非空”"在scala的构建工具(sbt)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆