Composer错误尝试更新包

时间:2015-10-28 18:18:28

标签: php laravel ssl https composer-php

我想在我的工作PC上下载软件包(并且在代理服务器后面)。我收到此错误:

  

[作曲\下载\ TransportException]
  “https://packagist.org/packages.json”文件不可能   已下载:SSL操作失败,代码为1. OpenSSL错误消息:   错误:140770FC:SSL例程:SSL23_GET_SERVER_HELLO:未知协议
  无法启用加密
  无法打开流:操作失败

我做了php composer.phar diag,这是输出:

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed
Checking HTTP proxy: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed
Checking HTTP proxy support for request_fulluri: OK
Checking HTTPS proxy support for request_fulluri: FAIL
Unable to assess the situation, maybe github is down (The "https://api.github.com/repos/Seldaek/jsonlint/zipball/1.0.0" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed)
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed
Checking disk free space: OK
Checking composer version: 


  [Composer\Downloader\TransportException]                                                                                       
  The "https://getcomposer.org/version" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:  
  error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol                                                            
  Failed to enable crypto                                                                                                        
  failed to open stream: operation failed                

希望有人可以帮助我。

谢谢!

1 个答案:

答案 0 :(得分:-1)

  

运行以下命令而不使用sudo:

composer update