解决PHP报错——cURL error 60: SSL certificate: unable to get local issuer certificate

使用Composer部署开发环境时,遇到错误,提示代码如下:

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
大致

解决方案

从提示信息可以了解到,大概就是无法验证远程站点证书,需要更新载入即可。

  • 下载地址:cacert.pem
  • 修改php.ini文件,curl.cainfo = "C:\Windows\cacert.pem" (这个就是下载后的cacert.pem文件路径,可随意更改)
  • 重启你的Nginx/PHP环境
CURLE_PEER_FAILED_VERIFICATION (60)

The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK. This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its previous value was 51.

资料来源:cURL error 60: SSL certificate: unable to get local issuer certificate

松鼠大大

若不是真的废物,谁又愿意混吃等死呢?

2 条评论

  1. 前来围观,正好看着了

    • 欢迎欢迎,晚上嚎!

发表评论

您的电子邮件地址不会被公开,必填项已用*标注。

相关推荐

微信扫一扫,分享到朋友圈

解决PHP报错——cURL error 60: SSL certificate: unable to get local issuer certificate