我正在尝试下载Laravel但是作曲家显示错误并在花了很多时间后停止安装过程。我引用了确切的错误,
[作曲\下载\ TransportException] 内容长度不匹配,从预期的353797
中收到131768字节create-project [-s | --stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [ - no-progress] [--no-secure-http] [--keep-vcs] [ - 删除-vcs] [--no-install] [--ignore-platform-reqs] [ - ] [] [] []
如何修复此错误并开始使用Laravel!
更新 - 我在config.json文件中进行了以下更改。
{
"config": {
"github-protocols": [
"https"
]
},
"repositories": {
"packagist.org": {
"type": "composer",
"url": "https://packagist.org"
}
}
}
但是,它也没有用!
答案 0 :(得分:-1)
composer.json 中的“存储库”键应如下所示:
"repositories" : [
{
"type": "composer",
"url": "https://packagist.org"
},
{
"packagist": false
}
]