gavin@webdev:~> curl -sS https://getcomposer.org/installer | php

Downloading...
Download failed: file_get_contents(): SSL operation failed with code . OpenSSL Error messages:
error::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
Downloading...
Download failed: file_get_contents(): SSL operation failed with code . OpenSSL Error messages:
error::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
Downloading...
Download failed: file_get_contents(): SSL operation failed with code . OpenSSL Error messages:
error::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.

解决:

wget http://curl.haxx.se/ca/cacert.pem
curl -sS https://getcomposer.org/installer | php -- --cafile=cacert.pem

安装 composer SSL operation failed with code 1的更多相关文章

  1. composer在update时提示file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO

    在开发的时候,需要把依赖的服务更新到最新,然后 手动composer update一下,提示如下: failed) Update failed (The "e "https://a ...

  2. 使用PHPMailer 中的报错解决 "Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:"

    PHPMailer项目地址:https://github.com/PHPMailer/PHPMailer 项目中用到PHPMailer,使用过程中报错:"Connection failed. ...

  3. phpmailer发送邮件出现错误:stream_socket_enable_crypto(): SSL operation failed with code 1.

    如果开了调试,调试进去会看到错误提示: smtp_code:"stream_socket_enable_crypto(): SSL operation failed with code 1. ...

  4. file_get_contents(): SSL operation failed with code 1

    出现file_get_contents(): SSL operation failed with code 1的错误 方法需要添加参数,如下: $stream_opts = [ "ssl&q ...

  5. composer 安装提示 PHP Warning: readfile(): SSL operation failed with code 1

    这是php设置openssl 没有指定cacert.pem (证书) 第一步:下载 cacert.pem 文件下载地址 https://curl.haxx.se/docs/caextract.html ...

  6. PHP函数file_get_contents()使用 https 协议时报错:SSL operation failed

    场景: file_get_contents() 函数是用于将文件的内容读入到一个字符串中,是读取文件内容常用的函数之一. 但是有时在服务器上使用file_get_contents() 函数请求http ...

  7. failed to open stream: operation failed

    # composer require oygza/aliyun-php-sdk-afs You are running composer with xdebug enabled. This has a ...

  8. Composer\Downloader\TransportException ... Failed to enable crypto,failed to open stream: operation failed

    failed to open stream: operation failed 错误详细信息: [Composer\Downloader\TransportException] The "h ...

  9. win7安装composer Failed to decode zlib stream

    今天学习php的时候想安装一下composer,刚开始采用的是exe文件的安装方式,可是安装了好几次都没有安装成功,如下图: 可能还有其他的一些错误,所以这里我就换了一个方式安装,就是自己手动来安装c ...

随机推荐

  1. ios中strong和weak的解释理解

    来自stackoverflow解释的挺有意思的 Imagine our object is a dog, and that the dog wants to run away (be dealloca ...

  2. webpack +vue开发(3)

    webpack的一些有用的命令 webpack --display-modules 在终端显示这些module,另外一个推荐使用 webpack --display-modules --display ...

  3. SQL 之witn as语法

    with as 是临时视图的语法:with qry_a as (select * from table_a )select * from qry_a ;

  4. Data Science at the Command Line学习笔记(二)

    1.vagrant建立简单httpserver方法: 1)映射端口 修改Vagrantfile, 末尾添加本地端口和虚机端口的映射关系, 然后执行vagrant reload. Vagrant::Co ...

  5. EventBus的一个bug??

    今天遇到了一个很奇怪的问题,activity A打开B,A和B中都注册了eventbus,都会接一个list的参数,当然两个list的参数不同,居然会报一个异常,A中List的参数会变成B的类型,错误 ...

  6. C#全角、半角转换

    全角:指一个字符占用两个标准字符位置:半角:指一字符占用一个标准的字符位置. using System; using System.Collections.Generic; using System. ...

  7. Apache 配置HTTPS协议搭载SSL配置

    在设置Apache + SSL之前, 需要做:     安装Apache, 请参见: Windows环境下Apache的安装与虚拟目录的配置, 下载安装Apache时请下载带有ssl版本的Apache ...

  8. Fragment一些问题

    1.使用fragment静态加载,当需要替换的时候使用replace方式是无效的....... 2.replace的容器如果是线性布局,那么将会出现之前的页面残留的情况,正确做法是使用FrameLay ...

  9. JavaScript 为什么要通过原型 prototype 调用函数, 而不是直接调用?

    现象 经常在网上或者阅读源码时看到下面的代码: Array.prototype.slice.call(arr, 3); 而不是 arr.slice(3); 原因 这是为什么呢, 毕竟下面这种方法更短, ...

  10. 通过微信分享链接,后面会被加上from=singlemessage&isappinstalled=1可能导致网页打不开

    微信分享会根据分享的不同,为原始链接拼接如下参数: 朋友圈   from=timeline&isappinstalled=0 微信群   from=groupmessage&isapp ...