Error “could not delete” with Composer on Vagrant

前端 未结 16 1132
闹比i
闹比i 2020-12-14 05:45

I have a Vagrant running Linux and I\'m trying to install Symfony.

After the command composer create-project symfony/framework-standard-edition ./ \"2.5.*\"

16条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-14 06:15

    It happened once to me and it turns out that I was hitting composer's timeout.

    You could take the following measures to gain some speed:

    1. Increase composer process-timeout (default 300) (not really needed if the following settings will help you gain speed, but can't hurt)
    2. Set dist as preferred install type.
    3. Enable https protocol for github, which is faster.

    ~/.composer/config.json

    {
        "config": {
            "process-timeout":      600,
            "preferred-install":    "dist",
            "github-protocols":     ["https"]
        }
    }
    

    If you still have problems after that, you can also clear composer's cache:

    rm -rf ~/.composer/cache
    

提交回复
热议问题