4

I'm getting this error when trying to run composer install. I have run composer update, and i'm trying to install using this lastest lock file. Nothing is helping.

Loading composer repositories with package information
Installing dependencies from lock file
  - Installing zendframework/zend-stdlib (2.3.0)
    Downloading: 100%
    Invalid zip file, retrying...
  - Installing zendframework/zend-stdlib (2.3.0)
    Downloading: 100%
    Invalid zip file, retrying...
  - Installing zendframework/zend-stdlib (2.3.0)
    Downloading: 100%
    Failed to download zendframework/zend-stdlib from dist: '/var/www/jetcharters.com/vendor/zendframework/zend-stdlib/Zend/Stdlib/79060e401f0aa9a175bb6adb812a0860' is not a zip archive.
    Now trying to download from source
  - Installing zendframework/zend-stdlib (2.3.0)
    Cloning d1c481b8a43f2f079b16d3567960ba539e9dacaa
    d1c481b8a43f2f079b16d3567960ba539e9dacaa is gone (history was rewritten?)



  [RuntimeException]
  Failed to execute git checkout 'd1c481b8a43f2f079b16d3567960ba539e9dacaa' -- && git reset --hard 'd1c481b8a43f2f079b16d3567960ba539e9dacaa' --
  fatal: reference is not a tree: d1c481b8a43f2f079b16d3567960ba539e9dacaa

My composer.json file doesn't reference zend directly, so I suppose it's a required package from another package?

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": {"": "src/"}
    },
    "repositories": [{"type": "vcs", "url": "https://github.com/oleosjo/vzaar.git"}],
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "~2.5",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~2.3",
        "sensio/framework-extra-bundle": "~3.0",
        "sensio/generator-bundle": "~2.3",
        "incenteev/composer-parameter-handler": "~2.0",
        "friendsofsymfony/user-bundle": "~2.0@dev",
        "pugx/multi-user-bundle": "3.0.*@dev",
        "andheiberg/vzaar": "dev-master",
        "cocur/slugify": "@stable",
        "vresh/twilio-bundle": "dev-master",
        "gregwar/captcha-bundle": "dev-master",
        "KnpLabs/Gaufrette": "dev-master",
        "knplabs/knp-paginator-bundle": "~2.4",
        "friendsofsymfony/jsrouting-bundle": "@stable",
        "geoip2/geoip2": "~2.0",
        "maxmind/geoip": "dev-master",
        "cystbear/authorizenet-php-sdk": "dev-master",
        "knplabs/knp-snappy-bundle": "dev-master",
        "whiteoctober/tcpdf-bundle": "dev-master",
        "stof/doctrine-extensions-bundle": "~1.1@dev",
        "practo/sentry-bundle": "dev-master",
        "seferov/aws-bundle": "~1.1",
        "league/csv": "~7.0",
        "ob/highcharts-bundle": "~1.2"
    },
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "php app/console maxmind:geoip:update-data  http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "php app/console maxmind:geoip:update-data  http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "symfony-assets-install": "symlink",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        }
    }
}
jeremib
  • 741
  • 2
  • 7
  • 17
  • 1
    did you try to delete the vendor folder and run `composer update` again? Sometimes this saved my life. – Pᴇʜ Jul 20 '15 at 09:30
  • I'm not sure what you are doing. Your question is not very clear. But if I copy the source of your `composer.json` above, paste it into a directory and run `composer update` everything installs well. Even the `zendframework/zend-stdlib` is downloading and installing fine. So maybe this info helps to find your issue, or describe more details and update your question. I can't reproduce the issue. – Pᴇʜ Jul 22 '15 at 11:41
  • Hi jeremib, did you have any luck with this? I'm having the same problem. On SLES 11 SP3. You? – Avindra Goolcharan Aug 04 '15 at 16:17
  • @AvindraGoolcharan Nope. Ended up installing on another server and it worked. – jeremib Aug 07 '15 at 20:02
  • @jeremib: Do you recall the OS you originally tried on, and what eventually worked? – Avindra Goolcharan Aug 10 '15 at 14:38
  • I am having the same problem now :(, it takes forever to install everything and I need to tell everybody to install git (we use SVN for work). I am on Win 7 and xampp. – Mihai P. Nov 23 '15 at 01:22

2 Answers2

4

To see why this happened look at bugs https://github.com/zendframework/zend-stdlib/issues/6 and https://github.com/zendframework/zend-stdlib/issues/12

I was able to get around this by replacing the hash d1c481b8a43f2f079b16d3567960ba539e9dacaa with 426b5396e89e7da2db9678bc9a0b57865f84fe0f in the composer.lock file and then rerun composer install.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
David Baucum
  • 2,162
  • 24
  • 25
3

Clear composer cache:

composer cc

It worked in my case.

Ardent Coder
  • 3,777
  • 9
  • 27
  • 53
Bdwey
  • 1,813
  • 1
  • 16
  • 18