Composer is very slow while downloading Laravel

妖精的绣舞 提交于 2020-06-14 05:02:41

问题


can you help me please? I want to install Laravel via composer create-project laravel/laravel in to the cms directory but Composer downloads it very very slow. Can you help me with it how to boost it?

Here is my terminal:

saidalo@Saidalo-Yodgoroff:/var/www/html$ composer create-project laravel/laravel cms "5.1.*"
Installing laravel/laravel (v5.1.33)
  - Installing laravel/laravel (v5.1.33)
    Downloading: 100%         

Created project in cms
> php -r "copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing vlucas/phpdotenv (v1.1.1)
    Downloading: 100%         

  - Installing symfony/var-dumper (v2.7.11)
    Downloading: 100%         

  - Installing symfony/translation (v2.7.11)
    Downloading: Connecting...

I don't know what to do!


回答1:


Try

composer config --global repo.packagist composer https://packagist.org

to force https




回答2:


There is a package to speed up your composer. It may be useful

  1. Disable Xdebug Turn it off and be happy.

  2. Use Prestissimo is a global Composer plugin that installs dependencies in parallel. It is crazy fast. It’s worth noting that Prestissimo requires cURL, which may not work behind certain firewalls or proxies. I haven’t run into any issues at all personally.

Source: composer speed up from laravel




回答3:


Try hirak/prestissimo Composer plug-in. It will drastically reduce dependency installation process of any large project.



来源:https://stackoverflow.com/questions/36832860/composer-is-very-slow-while-downloading-laravel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!