Problems when The composer downloading mpdf

别说谁变了你拦得住时间么 提交于 2021-01-28 04:23:33

问题


C:\xampp\htdocs\presensi\vendor>composer require mpdf/mpdf
Using version ^8.0 for mpdf/mpdf
./composer.json has been updated
Running composer update mpdf/mpdf
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Downloading mpdf/mpdf (v8.0.10)
  - Downloading mpdf/mpdf (v8.0.10)
  - Downloading mpdf/mpdf (v8.0.10)
  - Downloading mpdf/mpdf (v8.0.10)

    **Failed to download mpdf/mpdf from dist: curl error 28 while downloading https://codeload.github.com/mpdf/mpdf/legacy.zip/1333a962cd2f7ae1a127b7534b7734b58179186f: Operation timed out after 300000 milliseconds with 25825474 out of 46573935 bytes received**
    Now trying to download from source
  - Installing mpdf/mpdf (v8.0.10): Cloning 1333a962cd
    Install of mpdf/mpdf failed

Installation failed, reverting ./composer.json and ./composer.lock to their original content.


  [RuntimeException]

  **Failed to clone https://github.com/mpdf/mpdf.git, git was not found, check that it is installed and in your PATH en
  v.
  'git' is not recognized as an internal or external command,
  operable program or batch file.**


require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...

I found this bug, when I Downloading mpdf


回答1:


Same problem from my end. I have downgraded to v8.0.8. Now working well.




回答2:


The only thing that worked for me was downgrading to composer version 1. I don't know why the installation works for others and not for some of us even after reinstalling composer. Here's how to downgrade to version 1 in composer: composer self-update --1



来源:https://stackoverflow.com/questions/65728672/problems-when-the-composer-downloading-mpdf

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