0

我试图在这里第一次运行我的 Laravel 4,在 Windows XP 环境中使用 WampServer2。我已经启用了 php_openssl.dll。

当我在 Laravel 根目录上发出“composer install”时,它会通过安装 filp/whoops,然后是学说来开始安装。问题发生在学说中:

D:\My Box Files\webdev\laravel4>composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing filp/whoops (1.0.7)
    Downloading: 100%

  - Installing doctrine/lexer (dev-master bc0e1f0)
    Downloading: 100%

  - Installing doctrine/annotations (v1.1.2)
    Downloading: 100%

  ...
  ...

  - Installing doctrine/dbal (dev-master fbce4b5)
    Downloading: 100%



  [UnexpectedValueException]
  'D:\My Box Files\webdev\laravel4\vendor/doctrine/dbal/0385cd8ce14f51b82fc70
  029e8890ac0' is not a zip archive.

任何人都知道为什么会这样?

4

1 回答 1

0

According to https://github.com/composer/composer/issues/1242 it may be network-related or corrupted cached files:

The problem is that Composer caches (in my case corrupted) files and so whenever you run the command it just reuses these corrupted files. It never downloads fresh versions of the file. The solution is to delete the cache files and rerun the command. The cache files are in the composer home directory: https://getcomposer.org/doc/03-cli.md#composer-home under the cache.files folder.

You can see the exact location of your composer cache files using the config command:

composer config --list
于 2013-07-29T11:36:01.990 回答