Composer安装

最近想学习一下yii2,但是composer一直安装失败,php -r "readfile('https://getcomposer.org/installer');" | php 执行会出现报错:

Warning: readfile(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify faile
d in Command line code on line 1

Warning: readfile(): Failed to enable crypto in Command line code on line 1

Warning: readfile(https://getcomposer.org/installer): failed to open stream: ope
ration failed in Command line code on line 1


而下载composer-setup.exe进行安装又会出现报错:

Connection Error [ERR_CONNECTION]: Unable to connect to getcomposer.org

Request to https://getcomposer.org/installer failed with errors:
SSL: Handshake timed out. Failed to enable crypto. Failed to open stream: operation failed


非常纠结。。

最终的方案:先在官网下载composer.phar(我也上传分享了一

posted @ 2015-12-28 12:07  寂地烟火  阅读(8)  评论(0)    收藏  举报  来源