之前用默认的composer配置,安装了laravel,现在切换会国内镜像,安装一个三方包,就提示这个
[Composer\Downloader\TransportException]
The "https://packagist.phpcomposer.com/packages.json" file could not be downloaded: Peer certificate CN=`*.b0.upaiy
un.com' did not match expected CN=`packagist.phpcomposer.com'
Failed to enable crypto
failed to open stream: operation failed
网上的解决方案都不行,我尝试多次,总有这个错误,也在该加的地方加了
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
}
是不是证书问题,我需要到哪里修改呢?
I still haven’t been able to solve the problem. I gave up the domestic package and shared the directory through samba of the Linux virtual machine. Then cd to the directory under windows and used composer under windows to install the expansion package. It was quite smooth and fast. It is still a foreign image. default allocation. It may be because the virtual machine is CentOS5.5 and the openssl version is too low (personal guess), so I’ve posted it. . .
I also encountered this problem, and I couldn’t find the answer, so sad.
OpenSSL configuration issues
See here for details