composer ssl3_get_server_certificate:certificate verify failed
-
使用 composer命令
composer self-update
或
composer require wechatpay/wechatpay
-
都出现以下问题:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Erro
r messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed -
composer使用了PHP命令进行操作,所以,需要开启openssl、配置证书
证书下载地址:http://curl.haxx.se/ca/cacert.pem -
配置php.ini这两项,注意换成自己的证书路径
curl.cainfo ="c:/cert.pem"
openssl.cafile = "c:/cert.pem" -
再来一次 composer self-update ,运行不报错
欢迎关注公众号:夜说猫,靓仔程序员每周新闻点评~
完。
热爱生活,热爱技术,热爱体育运动. 写的了代码,画的了画,上得厅堂下的了厨房.