由于证书问题,无法安装作曲家 [英] Can't install composer due to certificate issues

查看:104
本文介绍了由于证书问题,无法安装作曲家的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我一整天都在尝试安装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操作完全相同的错误,代码为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

这篇关于由于证书问题,无法安装作曲家的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆