安装 composer SSL operation failed with code 1

来源:互联网 发布:java 异或 php 编辑:程序博客网 时间:2024/05/23 14:23
root@yumh:> curl -sS https://getcomposer.org/installer | phpDownloading...Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failedfile_get_contents(): Failed to enable cryptofile_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failedDownloading...Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failedfile_get_contents(): Failed to enable cryptofile_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failedDownloading...Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failedfile_get_contents(): Failed to enable cryptofile_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failedThe download failed repeatedly, aborting.
复制代码 

解决:

wget http://curl.haxx.se/ca/cacert.pem
curl -sS https://getcomposer.org/installer | php -- --cafile=cacert.pem
或者
curl -sS http://getcomposer.org/installer | php -- --cafile=cacert.pem
0 0
原创粉丝点击