OpenSSL错误消息:错误:14090086:SSL例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败无法启用加密

时间:2015-08-14 22:40:26

标签: laravel ssl composer-php

我正在使用OS X Yosemite

我在Composer中运行了以下命令,因为Laravel无法始终正常下载和安装:

composer diagnose

结果:

Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: FAIL
[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 verify failed
Failed to enable crypto
failed to open stream: operation failed
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" 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: 


  [Composer\Downloader\TransportException]                                     
  The "https://getcomposer.org/version" file could not be downloaded: SSL ope  
  ration 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 

我想关注的主线是:

SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto

我该如何解决这个问题。我在网上尝试了几种解决方案,但都没有。我对使用命令行完全不熟悉。

使用以下命令下载和安装Laravel时:composer create-project laravel/laravel --prefer-dist我不能自己手动下载这些内容并将其放在正确的文件夹中以避免此SSL问题吗?

1 个答案:

答案 0 :(得分:-1)

另一个可能的原因是服务器的SSL证书已过期。如果是您的服务器,请检查/ etc / apache2 / ssl(对于ubuntu)。证书通常持续365天。请参阅' https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04'如何创建一个。