【问题标题】:php - composer update returns certificate verify failedphp - 作曲家更新返回证书验证失败
【发布时间】:2017-03-08 14:16:35
【问题描述】:

当我尝试执行 composer installcomposer update 时,我收到一条错误消息,指出无法验证 SSL 证书。

  [Composer\Downloader\TransportException]                                 
  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 ver  
  ify failed                                                               
  Failed to enable crypto                                                  
  failed to open stream: operation failed  

有人知道我该如何解决这个问题吗?

【问题讨论】:

标签: php laravel terminal composer-php


【解决方案1】:

我自己没有遇到过这种情况,但是在快速搜索之后,我找到了一个潜在的解决方案(如果您使用的是 PHP 5.6):

# update the ports tree (software list)
$ sudo port -v selfupdate
# install php (shortcut for compiling php with our required libs)
$ sudo port install php56
# install the mcrypt library for php
$ sudo port install php56-mcrypt
# install the curl library for php
$ sudo port install php56-curl
# configure which php version your system should use
$ sudo port select php php56

来源:https://github.com/composer/composer/issues/2798(那里也有针对此问题的其他潜在解决方案。希望对您有所帮助!

【讨论】:

    猜你喜欢
    • 2016-07-28
    • 1970-01-01
    • 2013-10-15
    • 2016-12-08
    • 2020-05-11
    • 2015-09-11
    • 1970-01-01
    • 2012-03-15
    • 1970-01-01
    相关资源
    最近更新 更多