cURL error 60: SSL certificate problem: unable to get local issuer

Posted smallyi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cURL error 60: SSL certificate problem: unable to get local issuer相关的知识,希望对你有一定的参考价值。

github 问题连接

https://github.com/yabacon/paystack-php/wiki/cURL-error-60:-SSL-certificate-problem:-unable-to-get-local-issuer-certificate-(see-http:--curl.haxx.se-libcurl-c-libcurl-errors.html)

根据这个说的步骤处理

How to resolve ?? ?

To resolve the error, you need to define your CURL certificate authority information path

To do that,

  1. Download the latest curl recognized certificates here: https://curl.haxx.se/ca/cacert.pem
  2. Save the cacert.pem file in a reachable destination.
  3. Then, in your php.ini file, scroll down to where you find [curl].
  4. You should see the CURLOPT_CAINFO option commented out. Uncomment and point it to the cacert.pem file. You should have a line like this:
curl.cainfo = “certificate pathcacert.pem” 

这里的路径要配置成绝对路径,不然就报curll77 error
技术分享图片

保存重启服务器 Save and close your php.ini. Restart your webserver and try your request again. 

If you do not set the right location, you will get a CURL 77 error.

Special thanks to @badruayomaya for writing this piece. Originally he faced the issue while using the Laravel-Paystack plugin.

以上是关于cURL error 60: SSL certificate problem: unable to get local issuer的主要内容,如果未能解决你的问题,请参考以下文章

cURL error 60: SSL certificate problem: unable to get local issuer certificate(转)亲测

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx

cURL error 60: SSL certificate problem: unable to get local issuer certifica 解决

Not hacking CurlException: 60 (cURL SSL Certificate Verification)

cURL error 60: SSL certificate problem: unable to get local issuer certifica

新装系统curl https报错:curl: (60) SSL certificate proble