Composer安装或更新抛出异常

时间:2018-05-08 13:09:33

标签: composer-php

我无法让我的作曲家安装或作曲家更新工作,导致以下错误。 如果我运行composer install或composer update,则需要很长时间才能抛出错误。

当我运行此命令时:

composer update

我得到以下输出:

Loading composer repositories with package information


[Composer\Downloader\TransportException]                                                                             
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Connection timed out  


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

composer diagnose的输出:

Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: WARNING
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded: failed to open stream: Connection timed out
Checking https connectivity to packagist: WARNING
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Connection timed out
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.6.5
PHP version: 7.0.30-1+ubuntu16.04.1+deb.sury.org+1
PHP binary path: /usr/bin/php7.0

我的系统配置:

  • OS:Ubuntu 16.04.4 LTS
  • PHP:PHP 7.0.30-1 + ubuntu16.04.1 + deb.sury.org + 1(cli)
  • 作曲家版本:1.6.5 2018-05-04 11:44:59

我搜索了很多,但没有为我找到合适的解决方案,请帮我解决一下

由于

0 个答案:

没有答案