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

我正在使用OS X Yosemite

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

作曲家诊断

结果:

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问题?

注意:我正在运行OS X Yosemite.我相信这也适用于小牛队.

在看了几个答案并将它们混合和匹配等之后.这是对我所做的一个粗略的解释.

>打开命令行并运行:

找到cacert.pem

这将列出您的证书所在的所有位置.

我的结果:

/Applications/Adobe Dreamweaver CS6/Configuration/Certs/cacert.pem
/Applications/MAMP/Library/lib/python2.7/test/pycacert.pem
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/_vendor/requests/cacert.pem
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/pycacert.pem
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_asyncio/pycacert.pem
/Users/robert/.composer/cacert.pem
/opt/vagrant/embedded/cacert.pem
/usr/ssl/certs/cacert.pem

>我从curl下载了最新的一个

http://curl.haxx.se/docs/caextract.html

>我在/usr/ssl / certs /中创建了一个目录

并将下载的证书放在/usr/ssl/certs/cacert.pem中

>我打开了我的php.ini文件并将此行放在文件的顶部:
openssl.cafile =的/usr/SSL /证书/ cacert.pem
>重启apache(停止apache并重新启动)

一切都为我而努力.

现在有一件事我认为需要做的是你需要告诉命令行你指的是哪个PHP.我在XAMPP下运行PHP,而不是在我的OS X上运行.所以命令行会认为你指的是OS X上的本机PHP而不是XAMPP上运行的PHP.这需要改变我相信这是有效的.如果不是那么它应该是好的.

如上所述,这个解决方案对我有用.

https://stackoverflow.com/questions/32019623/openssl-error-messages-error14090086ssl-routinesssl3-get-server-certificate

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:laravel – OpenSSL错误消息:错误:14090086:SSL例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败无法启用加密