我试着安装cakephp 3.0运行:
composer create-project -s dev cakephp/app cakedev
还有git cloning cakephp/app然后运行composer update但是我一直得到同样的错误:
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:
我试图使用sudo运行命令,但也得到错误.
有任何想法吗?
删除〜/ .composer/cache/*中的composer缓存,并尝试使用此方法增加composer超时
尝试使用--prefer-dist选项如果不起作用尝试增加作曲家超时(默认为il 300)
export COMPOSER_PROCESS_TIMEOUT=600 php composer.phar install --prefer-dist