douyiji3919
douyiji3919
2014-08-08 16:04

使用composer安装CakePHP 3.0时出错

已采纳

I tried to install cakephp 3.0 running:

composer create-project -s dev cakephp/app cakedev

and also git cloning cakephp/app and then running composer update but I keep getting the same error:

Installing cakephp/cakephp (3.0.x-dev 0a2ff83)
    Cloning 0a2ff83156e5725b7e9339fb655e280ee70ce5aa
Executing command (CWD): git clone --no-checkout 'git://github.com/cakephp/cakephp.git' '/home/vagrant/www/cakedev/vendor/cakephp/cakephp' && cd '/home/vagrant/www/cakedev/vendor/cakephp/cakephp' && git remote add composer 'git://github.com/cakephp/cakephp.git' && git fetch composer
Failed: [Symfony\Component\Process\Exception\ProcessTimedOutException] The process "git clone --no-checkout 'git://github.com/cakephp/cakephp.git' '/home/vagrant/www/cakedev/vendor/cakephp/cakephp' && cd '/home/vagrant/www/cakedev/vendor/cakephp/cakephp' && git remote add composer 'git://github.com/cakephp/cakephp.git' && git fetch composer" exceeded the timeout of 300 seconds.
Failed to download cakephp/cakephp from source: The process "git clone --no-checkout 'git://github.com/cakephp/cakephp.git' '/home/vagrant/www/cakedev/vendor/cakephp/cakephp' && cd '/home/vagrant/www/cakedev/vendor/cakephp/cakephp' && git remote add composer 'git://github.com/cakephp/cakephp.git' && git fetch composer" exceeded the timeout of 300 seconds.
Now trying to download from dist
  - Installing cakephp/cakephp (3.0.x-dev 0a2ff83)

Failed: [RuntimeException] Could not delete /home/vagrant/www/cakedev/vendor/cakephp/cakephp/.git/objects/pack/tmp_pack_9VVOjS:

Reading ./composer.json
Loading config file ./composer.json



  [RuntimeException]

  Could not delete /home/vagrant/www/cakedev/vendor/cakephp/cakephp/.git/objects/pack/tmp_pack_9VVOjS:

enter image description here

I tried to run the commands using sudo and also get error.

Any ideas?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • doujiyong7604 doujiyong7604 7年前

    Remove composer cache in ~/.composer/cache/* and try to increase composer timeout with this methods

    Try with --prefer-dist option if not works try to increase composer timeout (default il 300)

    export COMPOSER_PROCESS_TIMEOUT=600
    php composer.phar install --prefer-dist
    
    点赞 评论 复制链接分享
  • dongzhihong3940 dongzhihong3940 6年前
    composer clearcache
    composer clear-cache
    

    Just for clarification The above lines are the built in ways to clear composer cache. Both commands are the same.

    点赞 评论 复制链接分享