<tfoot id='eM4ys'></tfoot>
    1. <legend id='eM4ys'><style id='eM4ys'><dir id='eM4ys'><q id='eM4ys'></q></dir></style></legend>
      • <bdo id='eM4ys'></bdo><ul id='eM4ys'></ul>
    2. <small id='eM4ys'></small><noframes id='eM4ys'>

      <i id='eM4ys'><tr id='eM4ys'><dt id='eM4ys'><q id='eM4ys'><span id='eM4ys'><b id='eM4ys'><form id='eM4ys'><ins id='eM4ys'></ins><ul id='eM4ys'></ul><sub id='eM4ys'></sub></form><legend id='eM4ys'></legend><bdo id='eM4ys'><pre id='eM4ys'><center id='eM4ys'></center></pre></bdo></b><th id='eM4ys'></th></span></q></dt></tr></i><div id='eM4ys'><tfoot id='eM4ys'></tfoot><dl id='eM4ys'><fieldset id='eM4ys'></fieldset></dl></div>

    3. 从 packagist 更新时 Composer 更新失败

      Composer update fails while updating from packagist(从 packagist 更新时 Composer 更新失败)

    4. <tfoot id='k39NB'></tfoot>
      • <bdo id='k39NB'></bdo><ul id='k39NB'></ul>
        • <legend id='k39NB'><style id='k39NB'><dir id='k39NB'><q id='k39NB'></q></dir></style></legend>

          <small id='k39NB'></small><noframes id='k39NB'>

          <i id='k39NB'><tr id='k39NB'><dt id='k39NB'><q id='k39NB'><span id='k39NB'><b id='k39NB'><form id='k39NB'><ins id='k39NB'></ins><ul id='k39NB'></ul><sub id='k39NB'></sub></form><legend id='k39NB'></legend><bdo id='k39NB'><pre id='k39NB'><center id='k39NB'></center></pre></bdo></b><th id='k39NB'></th></span></q></dt></tr></i><div id='k39NB'><tfoot id='k39NB'></tfoot><dl id='k39NB'><fieldset id='k39NB'></fieldset></dl></div>
                  <tbody id='k39NB'></tbody>
              • 本文介绍了从 packagist 更新时 Composer 更新失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在执行 composer install/update 时,openssl 出现以下错误:

                While executing composer install/update I have got the following error from openssl:

                无法下载https://packagist.org/packages.json"文件:SSL 操作失败,代码为 1.OpenSSL 错误消息:错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败无法启用加密无法打开流:操作失败https://packagist.org 无法完全加载,包信息已从本地缓存加载,可能已过期

                The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Failed to enable crypto failed to open stream: operation failed https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

                我正在使用:

                1. PHP 5.6.3 (cli)(构建时间:2014 年 11 月 17 日 15:16:53)
                2. XAMPP 堆栈 5.6.3-0
                3. Ubuntu 14.04

                作曲家诊断显示:

                Checking composer.json: OK
                Checking platform settings: OK
                Checking git settings: OK
                Checking http connectivity: FAIL
                [ComposerDownloaderTransportException] The "https://packagist.org/packages.json"  file  could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
                error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
                Failed to enable crypto
                failed to open stream: operation failed
                Checking disk free space: OK
                Checking composer version: 
                

                [作曲家下载器传输异常]
                无法下载https://getcomposer.org/version"文件:SSL 操作失败,代码为 1.OpenSSL 错误消息:
                错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败
                无法启用加密
                无法打开流:操作失败

                [ComposerDownloaderTransportException]
                The "https://getcomposer.org/version" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
                error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
                Failed to enable crypto
                failed to open stream: operation failed

                php -r 'var_dump(openssl_get_cert_locations());'显示:

                php -r 'var_dump(openssl_get_cert_locations());' shows:

                array(8) {
                ["default_cert_file"]=>
                string(33) "/opt/lampp/share/openssl/cert.pem"
                ["default_cert_file_env"]=>
                string(13) "SSL_CERT_FILE"
                ["default_cert_dir"]=>
                string(30) "/opt/lampp/share/openssl/certs"
                ["default_cert_dir_env"]=>
                string(12) "SSL_CERT_DIR"
                ["default_private_dir"]=>
                string(32) "/opt/lampp/share/openssl/private"
                ["default_default_cert_area"]=>
                string(24) "/opt/lampp/share/openssl"
                ["ini_cafile"]=>
                string(0) ""
                ["ini_capath"]=>
                string(0) ""
                }
                

                对于 php 5.5.19,一切正常.

                For php 5.5.19 everything is Ok.

                推荐答案

                我找到了解决方案

                我正在跑步:
                FreeBSD 10.1
                Apache2.4
                PHP 5.6.3

                I'm running:
                FreeBSD 10.1
                Apache2.4
                PHP 5.6.3

                为了找到 CA 文件,我运行了这个命令

                To find the CA file I ran this command

                <代码>>找到cacert.pem

                结果是:
                /usr/local/lib/perl5/site_perl/5.16/Mozilla/CA/cacert.pem

                Result was:
                /usr/local/lib/perl5/site_perl/5.16/Mozilla/CA/cacert.pem

                然后打开php.ini文件和
                改变这个:

                Then open the php.ini file and
                change this:

                ;openssl.cafile=

                ;openssl.cafile=

                对此:

                openssl.cafile=/usr/local/lib/perl5/site_perl/5.16/Mozilla/CA/cacert.pem

                openssl.cafile=/usr/local/lib/perl5/site_perl/5.16/Mozilla/CA/cacert.pem

                注意:该指令仅适用于 php 5.6.x

                Note: This directive is only available on php 5.6.x

                然后重启Apache

                这篇关于从 packagist 更新时 Composer 更新失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                  <i id='fFpv2'><tr id='fFpv2'><dt id='fFpv2'><q id='fFpv2'><span id='fFpv2'><b id='fFpv2'><form id='fFpv2'><ins id='fFpv2'></ins><ul id='fFpv2'></ul><sub id='fFpv2'></sub></form><legend id='fFpv2'></legend><bdo id='fFpv2'><pre id='fFpv2'><center id='fFpv2'></center></pre></bdo></b><th id='fFpv2'></th></span></q></dt></tr></i><div id='fFpv2'><tfoot id='fFpv2'></tfoot><dl id='fFpv2'><fieldset id='fFpv2'></fieldset></dl></div>
                    <tbody id='fFpv2'></tbody>

                  <tfoot id='fFpv2'></tfoot>

                    <small id='fFpv2'></small><noframes id='fFpv2'>

                          <bdo id='fFpv2'></bdo><ul id='fFpv2'></ul>

                          <legend id='fFpv2'><style id='fFpv2'><dir id='fFpv2'><q id='fFpv2'></q></dir></style></legend>