<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 更新失败

      时间:2023-10-15

    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 更新失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何让 Ruby AES-256-CBC 和 PHP MCRYPT_RIJNDAEL_128 一起玩 下一篇:openSSL 不适用于 PHP 内置网络服务器

                相关文章

                  <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>
                1. <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>