欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

Composer “Download failed” Error


i use xampp in Windows and my PHP Version is 5.5.15 . need to install composer for Start work with laravel framework. but my problem is here, when i want install composer, be faced with this error :

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.

What should I do? and is there a way to install laravel without using composer ?

shareimprove this question
 

Because you haven't installed SSL Certificate in your computer.

First of all, you should download a global SSL Certificate:

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

Then, update you php.ini file by appending following lines to it:

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

Good luck!

shareimprove this answer
 
   
As fas as I know the openssl.cafile php.ini setting is available only since PHP 5.6 so I won't have any effect with PHP 5.5 (OP is using 5.5) – Ventus May 27 '16 at 10:33

You basically have to set the environment variable SSL_CERT_FILE to the path of the PEM file of the ssl-certificate downloaded from the following link : http://curl.haxx.se/ca/cacert.pem.

It took me a lot of time to figure this out.

For a detailed answer, you can have a look here: https://stackoverflow.com/questions/34590842/cannot-install-composer-on-mac-os-x

shareimprove this answer
 
   
as that question was removed can you provide a detailed answer? – pppp Jun 22 '16 at 16:48

来自 https://stackoverflow.com/questions/26095708/composer-download-failed-error



  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

作曲家“下载失败”的错误

 

我在窗户和我的PHP版本是5.5.15使用XAMPP。需要安装用于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.

该怎么办?有一种方法不用安装laravel作曲家?

分享改善这个问题
 

因为你没有在您的计算机安装SSL证书。

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

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

然后,你更新php.ini通过添加以下代码文件:

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

祝你好运!

分享提高这个答案
 
  
只要我知道openssl.cafilephp.ini设置只因为PHP 5.6所以我不会有任何的影响可用PHP 5.5(OP是用5.5)万途仕16年5月27日10:33

你基本上要设置环境变量ssl_cert_file能从下面的链接下载SSL证书PEM文件的路径:curl.haxx.se http:/ / / / cacert.pem CA

我花了很多时间想出来的。

一个详细的回答,你可以在这里看看:https://stackoverflow.com/questions/34590842/cannot-install-composer-on-mac-os-x

分享提高这个答案
 
  
当这个问题被你能提供一个详细的答案吗?PPPP君22在16 16:48

你的答案



普通分类: