[FAQ] Composer, Content-Length mismatch

通过llama.cpp与羊驼聊天的网页界面- 详解 Serge 的启动使用

 

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/

 

Refer:Composer length mismatch

Link:https://www.cnblogs.com/farwish/p/12233575.html

posted on 2020-01-25 23:12  ercom  阅读(573)  评论(0编辑  收藏  举报