安装Thinkphp6时,composer插件报错 Content-Length mismatch解决办法

 [Composer\Downloader\TransportException]
  Content-Length mismatch, received 28935 bytes out of the expected 1871484
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

直接更换源:

composer config repo.packagist composer https://packagist.phpcomposer.com

你可能感兴趣的:(PHP)