This question already has answers here:
Error - trustAnchors parameter must be non-empty

(45个答案)


2年前关闭。




当我尝试运行./gradlew run时,我不断得到:
Downloading https://services.gradle.org/distributions/gradle-4.4.1-bin.zip

Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

尝试过curl -v https://services.gradle.org/distributions/gradle-4.4.1-bin.zip而且效果很好
Connected to services.gradle.org (2400:cb00:2048:1::6810:aba6)
successfully set certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs

最佳答案

您没有提到正在使用哪个JDK或OS /发行版,但是ca-certificates-java可能不是Oracle JDK / JRE中的依赖项,因此必须明确安装。

您可能需要运行

sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure

也可以看看
Error - trustAnchors parameter must be non-empty

07-28 13:05