Composer hanging while updating dependencies

前端 未结 13 1254
青春惊慌失措
青春惊慌失措 2020-12-24 05:30

I tried updating a Laravel project I\'m working on today using composer update

But it hung on Updating dependencies (including require-dev)

相关标签:
13条回答
  • 2020-12-24 05:46

    In my case, it was simply taking a very long time on my 8GB ram Mac. To check the progress and verify that it is going through the dependencies, run composer in verbose mode. This was an approach I missed in the question so worth re-stating here.

    composer update -vvv
    
    0 讨论(0)
  • 2020-12-24 05:50

    Working for me. First Run command for auto load, then clear cache and run update.

    composer dump-autoload
    php artisan cache:clear
    php artisan view:clear
    composer update
    
    0 讨论(0)
  • 2020-12-24 05:50

    Restart your system.

    I faced the same problem today. Going by advice, turned off xdebug, but did not help. Verified all files were present. Restarted my system, and it worked.

    0 讨论(0)
  • 2020-12-24 05:50

    I found this in another article, I found that doing the following below worked. It seemed to be a cache/download issue into the composer packages cache.

    composer update -vvv

    Then doing the following: Add or edit your composer file to have these settings.

    "repositories": [
        {
             "type": "composer", 
             "url": "https://packagist.org"
        },
        { "packagist": false }
    ]

    0 讨论(0)
  • 2020-12-24 05:53

    Check if you are running the minimum required php version

    Compare with the specified required php version in the composer.json file

    Open terminal run

    php -v

    Cross check in composer.json file see example below

    "require": { "php": "^7.1.3", }

    0 讨论(0)
  • 2020-12-24 05:54

    I solved it by editing php.ini file in order to set de cacert required for ssl verification:

    1. Download the file http://curl.haxx.se/ca/cacert.pem
    2. Edit php.ini to set the pat:

      [openssl]
      ; The location of a Certificate Authority (CA) file on the local filesystem
      ; to use when verifying the identity of SSL/TLS peers. Most users should
      ; not specify a value for this directive as PHP will attempt to use the
      ; OS-managed cert stores in its absence. If specified, this value may still
      ; be overridden on a per-stream basis via the "cafile" SSL stream context
      ; option.
      openssl.cafile=C:\web\certs\cacert.pem
      curl.cainfo=C:\web\certs\cacert.pem
      
    3. Try again

    0 讨论(0)
提交回复
热议问题