douyiji3919 2014-08-08 16:04
浏览 98
已采纳

使用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 2014-08-08 18:39
    关注

    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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?