【问题标题】:error on php composer.phar installphp composer.phar 安装错误
【发布时间】:2014-12-22 12:06:52
【问题描述】:

我是 php 和 rabbitmq 的新手。在 Debian 中,我在 /bin 目录中安装了 composer.phar。现在我想运行下面的命令来获取本地项目定义的依赖项。

php composer.phar install

但它会使用红色背景引发错误消息,如下所示

  [Composer\Downloader\TransportException]                                     
  The "https://packagist.org/packages.json" 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  

请帮忙怎么办? 在 php.ini 中启用 openSSL 时,它会抛出以下警告

Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0

【问题讨论】:

    标签: php debian rabbitmq composer-php autoload


    【解决方案1】:

    您必须启用 openssl 否则您无法建立 ssl 连接。

    如果已经安装,您可以在 php.ini 中执行此操作。否则你必须先安装它。

    也许作为另一种解决方案,使用 openssl 安装 php5-cli 版本,并且不要使用 lampp 堆栈。您可以使用apt-get install php5-cli php5-openssl 安装该命令。然后你应该使用内部包,它应该可以工作。

    【讨论】:

    • 感谢您的回复,但我使用的是 Debian。
    • 我按照您的建议执行并重新运行命令,我发现以下警告:警告:PHP 启动:无法加载动态库 '/opt/lampp/lib/php/extensions/no-debug-non -zts-20131226/php_openssl.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll:无法打开共享对象文件:在线未知中没有这样的文件或目录0
    • 你使用debian和lampp????为什么??您拥有该星球上最好的存储库之一。为什么不从那里安装 PHP?那容易得多。 apt-get install php5-openssl 通常默认安装。
    • 我已经发布了另一个解决方案。
    猜你喜欢
    • 1970-01-01
    • 2014-08-10
    • 1970-01-01
    • 2014-05-05
    • 2016-05-03
    • 2015-12-07
    • 1970-01-01
    • 2016-01-01
    • 1970-01-01
    相关资源
    最近更新 更多