2014-09-29 184 views
1

我在Windows中使用xampp,我的PHP版本是5.5.15。 需要安装composer for开始使用laravel框架。但我的问题是在这里,当我想安装作曲家,面临这个错误:作曲家“下载失败”错误

Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: 
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 
file_get_contents(): Failed to enable crypto 
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failed 
Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: 
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 
file_get_contents(): Failed to enable crypto 
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failed 
Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: 
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 
file_get_contents(): Failed to enable crypto 
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failed 
The download failed repeatedly, aborting. 

我该怎么办? 有没有办法在不使用composer的情况下安装laravel?

+0

可能重复http://stackoverflow.com/questions/23900656/errors-in-installing -php-composer-on-windows) – Benz 2014-09-29 08:44:13

回答

0

因为您尚未在您的计算机中安装SSL证书。通过添加以下行它

wget http://curl.haxx.se/ca/cacert.pem 

然后,更新您的php.ini 文件

首先,你应该下载一个全球SSL证书

openssl.cafile=/anywhere-you-like/cacert.pem 

祝你好运!

+0

就像我知道'openssl.cafile' php.ini设置仅在PHP 5.6以后才可用,所以我不会对PHP 5.5有任何影响(OP使用5.5) – Ventus 2016-05-27 10:33:46