php - 无法在 Windows 10 Pro build 1809 : SSL operation failed with code 1 上安装 Composer

标签 php ssl openssl composer-php

我尝试在全新安装的 Windows 10 Pro build 1809 上安装 Composer,但收到此错误消息。

The Composer installer script was not successful [exit code 1]. OpenSSL failed with a 'certificate verify failed' error. This indicates a problem with the Certificate Authority file(s) on your system, which may be out of date.

证书位置[来自 openssl.cafile ini 设置]:

D:\xampp\apache\bin\curl-ca-bundle.crt

您的命令行 PHP 使用的 php.ini 是:D:\xampp\php\php.ini

脚本输出:

The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:  
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
    Failed to enable crypto
    failed to open stream: operation failed

我尝试用 http://curl.haxx.se/ca/cacert 中的“cacert.pem”替换“curl-ca-bundle.crt”或使用“ca-bundle.crt”,但这没什么,错误消息仍然发生。

谁能帮我解决这个问题?

最佳答案

最后,我解决了这个问题。因为我的公司在网络上屏蔽了一些东西。然后我尝试切换到其他网络,然后安装成功!

关于php - 无法在 Windows 10 Pro build 1809 : SSL operation failed with code 1 上安装 Composer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56559787/

相关文章:

使用 Tungstenite : SSL alert number 42 实现 SSL

apache - OpenSSL 在 csr 文件中生成未知的电子邮件地址?

PHP $_POST 不带重音符号

php - 如何使用 codeigniter 使 zend studio 自动完成

php - 生成图像然后发送它而不先将其保存为文件?

php - 查找使用加密私钥curl连接第三方时出现间歇性 "Incorrect Password"错误的原因

java - ClientHello TLSv1 而不是 TLSv1.2

iphone - iPhone 的安全远程密码实现

c - RSA_public_encrypt 在输出缓冲区中提供垃圾输出

php - 具有扩展 PDOStatement 的 PDO 在设置 NULL 时无法断开连接