Composer需要或更新错误

时间:2017-03-24 10:06:31

标签: yii2 composer-php

尝试在Windows 10中更新作曲家时(在今天之前很好)。但是今天我得到了这样的错误

    Reading C:/Users/Wilson/AppData/Local/Composer/repo/https---packagist.org/p-provider-2013.json from cache
Content-Length mismatch
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Downloading http://packagist.org/p/provider-2017-01%24464ecabe7bed9235d9c8eab9973bf43265f6c91cf94ba8c49425d34dcb54b34e.json


  [Composer\Downloader\TransportException]
  The "http://packagist.org/p/provider-2017-01%24464ecabe7bed9235d9c8eab9973bf43265f6c91cf94ba8c49425d34dcb54b34e.jso
  n" file could not be downloaded (HTTP/1.1 302 Found)


Exception trace:
 () at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:373
 Composer\Util\RemoteFilesystem->get() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:101
 Composer\Util\RemoteFilesystem->getContents() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:665
 Composer\Repository\ComposerRepository->fetchFile() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:577
 Composer\Repository\ComposerRepository->loadProviderListings() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:296
 Composer\Repository\ComposerRepository->whatProvides() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Pool.php:204
 Composer\DependencyResolver\Pool->computeWhatProvides() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Pool.php:193
 Composer\DependencyResolver\Pool->whatProvides() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:987
 Composer\Installer->processDevPackages() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:466
 Composer\Installer->doInstall() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:223
 Composer\Installer->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/UpdateCommand.php:158
 Composer\Command\UpdateCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:850
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:193
 Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:227
 Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:124
 Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:100
 Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:54
 require() at C:\ProgramData\ComposerSetup\bin\composer.phar:24

请帮忙。感谢。

1 个答案:

答案 0 :(得分:0)

实际上我添加了两个不同名称的插件,如

"kartik-v/yii2-widgets": "*", and "kartik-v/yii2-widget-select2": "@dev"

所以作曲家给出结果(HTTP / 1.1 302 Found)。 再次感谢Bizley对我的问题发表评论。