1.使用composer安装laravel报如下错误:意思就是下载的内容长度不够。
Content-Length mismatch, received 422267 bytes out of the expected 1786010
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date2.报错原因:原因是使用的国外的镜像
3.解决办法:修改配置的镜像源
composer config -g repo.packagist composer https://packagist.phpcomposer.com
4.再次安装即可正常安装