我尝试安装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运行命令,但也会出错。
有什么想法吗?
答案 0 :(得分:6)
删除〜/ .composer / cache / *中的composer缓存并尝试使用此方法增加composer超时
尝试使用--prefer-dist选项如果不起作用,请尝试增加composer超时(默认为il 300)
export COMPOSER_PROCESS_TIMEOUT=600
php composer.phar install --prefer-dist
答案 1 :(得分:0)
composer clearcache
composer clear-cache
只是为了澄清以上几行是清除作曲家缓存的内置方法。两个命令都是一样的。