2020年8月

Content-Length mismatch, received 59879 bytes out of the expected 1472830

http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date

解决方案

此时 查看一下当前项目的composer镜像

composer config -l

在这里插入图片描述

发现自己使用的镜像是中国镜像

https://packagist.phpcomposer.com

这个镜像是有问题的 所以需要更换镜像

这边需要注意的是 更换镜像不要进行全局更换的命令 而是要针对这个项目去更换镜像

所以 我们在这个项目的根目录下也就是composer.json的路径下

针对这个项目 进行更换镜像 使用阿里云镜像!

composer config repo.packagist composer https://mirrors.aliyun.com/composer/

【来源:CSDN 徊忆羽菲】https://blog.csdn.net/guo_qiangqiang/article/details/107408547