在Wampserver 2.5的Windows 7 64位上安装Composer时出错 [英] Error Installing Composer on Windows 7 64-bit with Wampserver 2.5

查看:162
本文介绍了在Wampserver 2.5的Windows 7 64位上安装Composer时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在W7 64x上安装Composer.使用站点Composer提供的Windows安装程序(Composer-setup.exe).

I'm trying to install the Composer on W7 64x. Using the installer for Windows that the site Composer provides (Composer-setup.exe).

我已经用php5.5.12和Apache2.4.9安装了Wampserver 2.5.在php.ini中启用了openssl.

I have installed the Wampserver 2.5 with php5.5.12 and Apache2.4.9. The openssl is enabled in php.ini.

我在安装过程中遇到以下错误:

I'm having the following errors in the installation:

Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error
messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
file_get_contents(): Failed to enable crypto
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation
failed
Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error
messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
file_get_contents(): Failed to enable crypto
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation
failed
Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error
messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
file_get_contents(): Failed to enable crypto
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation
failed
The download failed repeatedly, aborting.

我安装了xampp和WPN XM,但同时使用php.exe显示以下错误:

I installed xampp and WPN XM, but using the php.exe of both shows the following error:

Connection Error [ERR_CONNECTION]: Unable to connect to getcomposer.org
Request to https://getcomposer.org/installer failed with errors:
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

推荐答案

确保SSL证书已被PHP安装并找到.

Ensure that the SSL certs are installed and found by PHP.

php.ini中:

curl.cainfo=/path/to/ssl-certs/ca-bundle.crt
openssl.cafile=/path/to/ssl-certs/ca-bundle.crt

如果缺少证书:请从 http://curl.haxx.se/下载证书包. ca/cacert.pem 并另存为ca-bundle.crt.

If certs are missing: download a cert bundle from http://curl.haxx.se/ca/cacert.pem and save as ca-bundle.crt.

(或直接使用Windows的服务器堆栈,该堆栈立即提供Composer: WPN-XM )

(Or simply use a server stack for Windows, which ships Composer right out-of-the-box: WPN-XM)

这篇关于在Wampserver 2.5的Windows 7 64位上安装Composer时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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