[PHP] Composer, Content-Length mismatch
Posted Ethan Plan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[PHP] Composer, Content-Length mismatch相关的知识,希望对你有一定的参考价值。
1.
$ composer config repos.packagist composer https://php.cnpkg.org
$ composer config cache-files-maxsize 2048MiB
其它镜像源 https://packagist.mirrors.sjtug.sjtu.edu.cn/
2.
vi /Users/xxx/.composer/config.json
{ "config": { "github-protocols": [ "https" ] }, "repositories": { "packagist.org": { "type": "composer", "url": "https://php.cnpkg.org" } } }
https://stackoverflow.com/questions/38635257/composer-content-length-mismatch
如果提示某个包找不到,就换个镜像源,比如:https://mirrors.aliyun.com/composer/
Link:https://www.cnblogs.com/farwish/p/12233575.html
以上是关于[PHP] Composer, Content-Length mismatch的主要内容,如果未能解决你的问题,请参考以下文章