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());"把证书放到下面就行

curl error 60 while downloading https://asset-packagist.org/packages.json: SSL certificate prob_第1张图片

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

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

4.重启PHP就好了

你可能感兴趣的:(php,composer,ssl,https,网络协议,composer)