Symfony的Composer安装/更新失败,出现302错误

时间:2017-08-23 13:58:34

标签: php symfony composer-php http-status-code-302

我已经安装了composer并从git服务器下载了一个Symfony应用程序,在进行作曲家安装或更新时遇到问题(同样的问题)。以下是更新的输出:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 38 installs, 0 updates, 0 removals
  - Installing psr/log (1.0.2): Downloading (failed)       
Downloading (failed)       
Downloading (failed)    Failed to download psr/log from dist: The "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" file could not be downloaded (HTTP/1.1 302 Found)
    Now trying to download from source
  - Installing psr/log (1.0.2): Cloning 4ebe3a8bf7 from cache
  - Installing monolog/monolog (1.23.0): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.5.0): Loading from cache
  - Installing twig/twig (v2.4.3): Loading from cache
  - Installing symfony/polyfill-util (v1.5.0): Downloading (100%)         
  - Installing paragonie/random_compat (v2.0.10): Downloading (failed)       
Downloading (failed)       
Downloading (failed)    Failed to download paragonie/random_compat from dist: The "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d" file could not be downloaded (HTTP/1.1 302 Found)
    Now trying to download from source
  - Installing paragonie/random_compat (v2.0.10): Cloning 634bae8e91 from cache
  - Installing symfony/polyfill-php70 (v1.5.0): Downloading (100%)         
  - Installing symfony/polyfill-php56 (v1.5.0): Downloading (100%)         
  - Installing symfony/symfony (v3.3.6): Downloading (failed)       
Downloading (failed)       
Downloading (failed)    Failed to download symfony/symfony from dist: The "https://api.github.com/repos/symfony/symfony/zipball/6f80cbd2dd89c5308b14e03d806356fac72c263e" file could not be downloaded (HTTP/1.1 302 Found)
    Now trying to download from source
  - Installing symfony/symfony (v3.3.6): Cloning 6f80cbd2dd


  [Symfony\Component\Process\Exception\ProcessTimedOutException]               
  The process "git clone --no-checkout 'https://github.com/symfony/symfony.gi  
  t' '/var/www/html/beyondrgtt/vendor/symfony/symfony' && cd '/var/www/html/b  
  eyondrgtt/vendor/symfony/symfony' && git remote add composer 'https://githu  
  b.com/symfony/symfony.git' && git fetch composer" exceeded the timeout of 3  
  00 seconds.

我一直在尝试过去几个小时,所以这可能是github服务器的一个问题,它会及时消失。有人有这个问题吗?我也试过--prefer-source,需要很长时间才能安装symfony / symfony和其他一些,然后显示:

[RuntimeException]                                                           
  Could not scan for classes inside "/var/www/html/projectname/vendor/symfony/  
  symfony/src/Symfony/Component/Intl/Resources/stubs" which does not appear t  
  o be a file nor a folder

1 个答案:

答案 0 :(得分:1)

似乎这个问题是一个临时问题(我在github上猜测)资源不可用,所以它试图重新指导。

如果将来发生这种情况,最好的办法是等待几个小时(在这种情况下大约需要3到4个小时)才能看出问题是否自行解决。