晚上 composer require monolog/monolog 失败后,所有composer install / composer update 都失败;
一直报如下错误
https://mirrors.aliyun.com/composer could not be fully loaded (curl error 61 while downloading https://mirrors.aliyun.com/composer/p2/guzzlehttp/guzzle.json: Error while processing content unencoding: Unknown failure within decompression software.), package information was loaded from the local cache and may be out of date
[Composer\Downloader\TransportException]
curl error 61 while downloading https://mirrors.aliyun.com/composer/p2/guzzlehttp/guzzle.json: Error while processing content unencoding:
Unknown failure within decompression software.
机器PHP版本7.1,require monolog/monolog 默认会引入2.0版本,而2.0版本需要PHP7.2以上,本地PHP版本不满足要求,怀疑在执行的时候缓存了错误的decompression包
执行 composer clear-cache
后恢复;改为引用monolog1.0版本 "monolog/monolog": "~1.0" 后正常
网友评论