问题描述
所以我整个上午都在尝试安装 composer,这样我就可以开始使用 laravel 框架了.
So I have tried all morning to install composer so I can start to use the laravel framework.
我在 php 7.0 上运行带有 XAMPP 的 windows server r2 标准 64 位
I am running windows server r2 standard 64bit with XAMPP on php 7.0
运行 Composer-Setup.exe 时,我收到以下消息..
When running the Composer-Setup.exe I get the following message..
无法下载https://getcomposer.org/versions"文件:SSL 操作失败,代码为 1.OpenSSL 错误消息:错误:14090086:SSL 例程:ssl3_get_server_certificate:证书验证失败 启用加密失败 无法打开流:操作失败
The "https://getcomposer.org/versions" 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
我已经在网上搜索过,在大多数情况下,我似乎遇到的问题是指定一个 cacert.pem 文件..
I have scoured the net, and in most cases, the issue that I seem to be having is specifying a cacert.pem file..
所以我按照说明从 - https://curl.haxx.se/下载证书ca/cacert.pem
So I followed instructions to download the cert from - https://curl.haxx.se/ca/cacert.pem
我只是制作了一个 .txt 文件,将上面链接中的内容复制到其中,并将文件重命名为 cacert.pem 文件.
I simply made a .txt file, copied the content into it from the above link and renamed the file so it was cacert.pem file.
然后在php.ini中指定.pem文件
Then specified the .pem file inside the php.ini
openssl.cafile=C:cacert.pem
openssl.cafile=C:cacert.pem
重新启动 apache,然后重新运行设置.
Restard apache then re ran the setup.
再次运行后,我得到与 ssl operation failed with code 1 完全相同的错误.
After running it again, I get exactly the same error about ssl operation failed with code 1.
希望有人能看到我在这里做错了什么?
Hopefully someone can see what I am doing wrong here?
推荐答案
你只需要在你的 php.ini 中取消注释这一行
You just have to uncomment this line in your php.ini
extension=php_openssl.dll
这篇关于由于证书问题无法安装作曲家的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!