一段时间以来,composer 偶尔会抱怨某些包的校验和验证失败。它继续从源代码安装它们。
通常这不是问题,但我想知道是否发生了一些奇怪的事情。
示例:
- Installing doctrine/data-fixtures (v1.2.2): Downloading (100%) Failed to download doctrine/data-fixtures from dist: The checksum verification of the file failed (downloaded from https://api.github.com/repos/doctrine/data-fixtures/zipball/17fa5bfe6ff52e35cb3d9ec37c934a2f4bd1fa2e)
Now trying to download from source
- Installing ocramius/proxy-manager (1.0.2): Downloading (100%) Failed to download ocramius/proxy-manager from dist: The checksum verification of the file failed (downloaded from https://api.github.com/repos/Ocramius/ProxyManager/zipball/57e9272ec0e8deccf09421596e0e2252df440e11)
Now trying to download from source
- Installing doctrine/migrations (v1.5.0): Downloading (100%) Failed to download doctrine/migrations from dist: The checksum verification of the file failed (downloaded from https://api.github.com/repos/doctrine/migrations/zipball/c81147c0f2938a6566594455367e095150547f72)
Now trying to download from source
- Installing doctrine/orm (v2.5.6): Downloading (100%) Failed to download doctrine/orm from dist: The checksum verification of the file failed (downloaded from https://api.github.com/repos/doctrine/doctrine2/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b)
Now trying to download from source
这是取自我本地计算机上的一次
composer install
调用。然而,许多软件包安装得很好。
在我们的 Jenkins 服务器上,据我所知,所有包都会发生这种情况。
那里发生了什么事?我们确实在本地网络中运行了 SATIS 服务,但 Composer 似乎抱怨原始包位置中的 dist 文件。 SATIS 服务仅用于私人包裹。
有人能想象问题是什么吗?有人遇到过类似的问题吗?
谢谢!
不是 100% 相关,但有一天可能会帮助别人。
我正在手动修改
composer.lock
文件(哦,太恐怖了!我知道,这是不好的做法,但有一个错误迫使我这样做)。我必须将 url
更改为包,并且之前的条目下面有一个 shasum
条目,但我没有删除。新条目不需要/没有那个。 Composer 正在查看那个 shasum
并注意到它不匹配。
所以我删除了
shasum
,一切都很好。
"dist": {
"type": "zip",
"url": "https://example.com/repo/path/package-1.0.0.zip",
"shasum": "abcdefg123456789"
},
"dist": {
"type": "zip",
"url": "https://repo.example.com/repo/path/package-1.0.1.zip",
"shasum": "abcdefg123456789"
},
"dist": {
"type": "zip",
"url": "https://repo.example.com/repo/path/package-1.0.1.zip"
},
尝试检查/更新composer版本并运行
composer clear-cache
之后