简体   繁体   中英

cpan fails because it can't verify cpan.org's SSL certificate

I upgraded perl from perl 5.18.2 to perl 5.36.0, and now many modules are missing. When I try to install the module using CPAN, I am getting errors.

For ex:

 cpan YAML::XS

It gave me the following error:

 ERROR: cannot verify cpan.org's certificate, issued by ‘/C=US/O=Let's 
 Encrypt/CN=R3’:
 Issued certificate has expired.
 To connect to cpan.org insecurely, use `--no-check-certificate'.

I tried following to resolve error:

 install -y ca-certificates

and

 update-ca-certificates

But none worked for me.

Now, what should I do, due to this I am not able to proceed further.

As Quentin says in a comment, this seems to have been a temporary glitch that has been fixed now.

But if you're using your system Perl, then it's probably safer to install modules using yum anyway.

$ yum install 'perl(YAML::XS)'

Update: I used yum because that's what you used in your example and that led me to believe that you're using Centos or some other Red Hat derivative. On newer versions of Red Hat and its children, yum is replaced by dnf . If you tell us which distribution you're using, we can tell you how to install pre-built packages of CPAN modules.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM