Is the cacerts file missing in ubuntu 15.10 and openjdk-8-jdk?

后端 未结 2 839
长情又很酷
长情又很酷 2020-12-10 01:34

I just installed Ubuntu 15.10 and their openjdk-8-jdk (by apt-get).

Now I am missing the cacerts file.

There is a link at the usual location:



        
2条回答
  •  天命终不由人
    2020-12-10 02:18

    Just to add an error here that Gergely answer solved, if you trying to call external apis with ssl and got this error:

    java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1903)
    

    This solved

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

提交回复
热议问题