javax.net.ssl.SSLException-trustAnchors参数必须为非空 [英] javax.net.ssl.SSLException - the trustAnchors parameter must be non-empty

查看:178
本文介绍了javax.net.ssl.SSLException-trustAnchors参数必须为非空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行./gradlew run时,我不断得到:

When I try to run ./gradlew run I keep getting:

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中的依赖项,因此必须明确安装.

You haven't mentioned which JDK or OS/distro you are using, but it's possible that ca-certificates-java is not a dependency in the Oracle JDK/JRE so this must be explicitly installed.

您可能需要运行

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

另请参阅 错误-trustAnchors参数必须为非空

这篇关于javax.net.ssl.SSLException-trustAnchors参数必须为非空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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