Composer尝试更新包时出错


Composer Error trying to update packages

我想在我的工作电脑上下载软件包(并且在代理后面)。我得到这个错误:

[Composer''Downloader''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                

希望有人能帮助我。

谢谢!

在没有sudo的情况下运行以下命令:

composer update