另一种情况是Composer无法安装

时间:2014-12-11 17:46:21

标签: php apache openssl installation composer-php

在过去的3天里,我已经阅读了有关作曲家安装问题的所有问题以及许多其他博客,并尝试了所有推荐的但仍然无法安装。以下是摘要。

php -v
PHP 5.4.16 (cli) (built: Jun  5 2013 21:01:46)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

在以下文件中取消评论extension=php_openssl.dllextension_dir = "ext"

  • C:\瓦帕\ BIN \ PHP中\ php5.4.16 \ php.ini中
  • C:\瓦帕\ BIN \ PHP中\ php5.4.16 \ php.ini的发展
  • C:\瓦帕\ BIN \ PHP中\ php5.4.16 \ php.ini中生产
  • C:\瓦帕\ BIN \阿帕奇\ Apache2.4.4 \ BIN \ php.ini中

来自php -i:
        OpenSSL的

    OpenSSL support => enabled
    OpenSSL Library Version => OpenSSL 0.9.8y 5 Feb 2013
    OpenSSL Header Version => OpenSSL 0.9.8y 5 Feb 2013

    extension_dir => ext => ext

Composer安装程序在C:\wamp\bin\php\php5.4.16\php.exe

中找到了php.exe

Composer安装设置:

    PHP version 5.4.16
          C:\wamp\bin\php\php5.4.16\php.exe

    Add to System path variable:
          C:\ProgramData\ComposerSetup\bin

    Shell Menus: 
          Do not install

Composer Installer错误:

    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(HYPERLINK HAD TO BE REMOVED TO ASK FOR HELP): 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(HYPERLINK HAD TO BE REMOVED TO ASK FOR HELP): 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(HYPERLINK HAD TO BE REMOVED TO ASK FOR HELP): failed to open stream: operation failed
    The download failed repeatedly, aborting.

    php -r "readfile('http://getcomposer.org/installer');" | php
    All settings correct for using Composer
    Downloading...
    Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
    file_get_contents(): Failed to enable crypto
    file_get_contents(HYPERLINK HAD TO BE REMOVED TO ASK FOR HELP): failed to open stream:
     operation failed
    Downloading...
    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(HYPERLINK HAD TO BE REMOVED TO ASK FOR HELP): failed to open stream:
     operation failed
    Downloading...
    Download failed: file_get_contents(HYPERLINK HAD TO BE REMOVED TO ASK FOR HELP): 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(): failed to open stream:
     operation failed
    The download failed repeatedly, aborting.

已删除的超链接全部指向:https://getcomposer.org/composer.phar

我希望有人有一些新的想法,因为我将要了解Composer的工作原理,因此我可以手动安装需要Composer的软件包。

PHP很棒,如果你能让所有的软件包都能运行的话。但是,让像Composer这样简单的东西实际工作可能需要数天的挫折。

1 个答案:

答案 0 :(得分:-2)

当从终端运行命令时,我也遇到了这个问题:

curl -sS https://getcomposer.org/installer | PHP

但是我发现从终端上运行了这个成功下载的composer.phar:

echo“https://getcomposer.org/composer.phar”)?>“ | php> composer.phar