curl error 60 while downloading https://asset-packagist.org/packages.json: SSL certificate prob

网上那写抄东抄西的什么composer镜像换成阿里云,去nmd能做点人事嘛,误导别人,搞得老子浪费几个小时=============下面解决正题==========

https://asset-packagist.org could not be fully loaded (curl error 60 while downloading https://asset-packagist.org/packages.json: SSL certificate problem: certificate has expired), package information was loaded from the local cache and may be out of date

像这种报错明显是PHP证书过期问题

没有安装CA证书导致的!!!

CA证书下载地址:

1.https://curl.se/docs/caextract.html  进入网址下载证书放到 

2.通过命令查看证书位置执行命令:php -r "print_r(openssl_get_cert_locations());"把证书放到下面就行

3.进入php.ini 配置文件修改

;openssl.cafile=/etc/pki/tls/certs/ca-bundle.crt  注释掉
openssl.cafile=/usr/local/php5/ssl/cacert.pem   改成证书位置

4.重启PHP就好了

  • 7
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值