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. php发送post包

    class Request{ public static function post($url, $post_data = '', $timeout = 5){//curl $ch = curl_in ...

  2. javascript性能优化总结一(转载人家)

    一直在学习javascript,也有看过<犀利开发Jquery内核详解与实践>,对这本书的评价只有两个字犀利,可能是对javascript理解的还不够透彻异或是自己太笨,更多的是自己不擅于 ...

  3. Velocity $ 和$! 区别

    输出指令 ${}过滤输出 输出表达式的计算结果,并进行过滤,比如:过滤变量中的HTML标签. 格式: ${expression} 示例: ${user.name} 注:HTTL缺省开启了EscapeX ...

  4. python Requests库在处理response时的一些陷阱

    python的Requests(http://docs.python-requests.org/en/latest/)库在处理http/https请求时还是比较方便的,应用也比较广泛.但其在处理res ...

  5. c# winform窗体闪烁解决方法

    在主窗体中任意位置加上下面的代码即可 protected override CreateParams CreateParams { get { CreateParams cp = base.Creat ...

  6. Android 触摸手势基础 官方文档概览2

    Android 触摸手势基础 官方文档概览 触摸手势检测基础 手势检测一般包含两个阶段: 1.获取touch事件数据 2.解析这些数据,看它们是否满足你的应用所支持的某种手势. 相关API: Moti ...

  7. json格式的数组长度

    var data = [{"id":"1","name":"a"},{"id":"2&qu ...

  8. TNS-12547 Linux Error: 104: Connection reset by pe (转载)

    TNS-12547 Linux Error: 104: Connection reset by peer 解决过程参考:http://blog.chinaunix.net/u/7121/showart ...

  9. 抽象类和抽象方法(关键字abstract)

     1.抽象类不能被实例化,可以没有,一个或多个抽象方法  2.抽象方法只有方法的声明但没有方法的实现,有抽象方法的类必须声明为抽象类,子类必须重写父类所有的抽象方法才能被实例化,否则子类也是个抽象类, ...

  10. C#EXCEL 操作类--C#ExcelHelper操作类

    主要功能如下1.导出Excel文件,自动返回可下载的文件流 2.导出Excel文件,转换为可读模式3.导出Excel文件,并自定义文件名4.将数据导出至Excel文件5.将指定的集合数据导出至Exce ...