Symfony 的 Composer 安装/更新失败并出现 302 错误
Composer install / update for Symfony failing with 302 errors
我已经安装了 composer 并从 git 服务器下载了一个 Symfony 应用程序,但在安装或更新 composer 时遇到问题(同样的问题)。这是更新的输出:
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.
过去几个小时我一直在尝试,所以这可能是 git 中心服务器的问题,会及时解决。有人遇到过这个问题吗?我也尝试过 --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
这个问题似乎是一个临时问题(我猜是在 github 上)资源不可用,因此它正在尝试重新定向。
如果将来发生这种情况,最好的办法似乎是等待几个小时(在本例中大约是 3 或 4 小时),看看问题是否自行解决。
我已经安装了 composer 并从 git 服务器下载了一个 Symfony 应用程序,但在安装或更新 composer 时遇到问题(同样的问题)。这是更新的输出:
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.
过去几个小时我一直在尝试,所以这可能是 git 中心服务器的问题,会及时解决。有人遇到过这个问题吗?我也尝试过 --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
这个问题似乎是一个临时问题(我猜是在 github 上)资源不可用,因此它正在尝试重新定向。
如果将来发生这种情况,最好的办法似乎是等待几个小时(在本例中大约是 3 或 4 小时),看看问题是否自行解决。